if anyone fancies doing me a really quick favour, it would be really appreciated:
static function make_url_safe($z){
$z = strtolower($z);
$z = preg_replace('/[^a-zA-Z0-9\s] /i', '', $z);
$z = str_ireplace(' ', '-', $z);
return $z;
}
what js functions should i be looking at to convert this function to javascript?
...
Hi. Does anyone know how to pull out the url of the image in wordpress so it can be used as a refrence in the script? I need to pull them dynamically. However when I'm using postimage(); it pulls out this:
<a href="address">
<img width="300" height="300" src="image.png" class="image" alt="" title="LINKING"/>
</a>
I'm only interested i...
How to switch on query_cache_type in wamp,
In my.ini there is nothing like query_cache_type ,
...
Hi,
How I can send all request in zend project to my default module controller (without use .access files).
Now it going to application->IndexController, Instead I need that every request will go to application->module->store->IndexController.
I try this:
public function indexAction()
{
$this->_forward('index','index','store')...
I need to add auto tagging to my facebook application so how can i add it ???? please let me know
...
Hey folks,
Previously I've worked on a Symfony project (MySQL PDO based) with XAMPP, with no problems.
Since then, I've moved to MAMP - I prefer this - but have hit a snag with my database connection.
I've created a test.php like this:
<?php
try {
$dbh = new PDO('mysql:host=localhost;dbname=xxx;port=8889', 'xxx', 'xxx');
fore...
Hello,
I would like to sanitize a string in to a URL so this is what I basically need.
Everything must be removed except alphanumeric characters and spaces and dashed.
Spaces should be converter into dashes.
Eg.
This, is the URL!
must return
this-is-the-url
Thanks
...
Criteria for 'better': fast in math and simple (few fields, many records) db transactions, convenient to develop/read/extend, flexible, connectible.
The task is to use a common web development scripting language to process and calculate long time series and multidimensional surfaces (mostly selecting/inserting sets of floats and doing m...
i would like to ask about some Notepad++ feature that i couldn't find in netbeans. And this feature is somehow really helpful. It's called 'function list' created by Jens Lorenz.
this feature will list all of declared function in a PHP files. So, is there any subtitute plugin that i can use to smooth my migration from Notepad++ to Netb...
Why is there different syntax same outcome?
For example
# Example 1
if($myCondition == true) :
#my code here
endif;
if($myCondition == true) {
#my code here
}
# Example 2
foreach($films as $film) :
#my code here
endforeach;
foreach($films as $film) {
#my code here
}
Also I have been using <?= for ages now and I n...
Hi.
After spending SEVERAL frustrated hours on this I am asking for your help.
I am trying to get the content of particular nodes from a SOAP response.
The response is
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="<a href="http://www.w3.org/2003/05/soap-envelope">http://www.w3.org/2003/05/soap-envelope</a>...
I would like to assign a value in a class property dynamically (that is referring to it using a variable).
#Something like:
setPropValue($obj, $propName, $value);
...
Hi, yesterday i noticed that sometimes on my webpage shows up javascript errors.
when i went to source code, i found that one of .js files was totaly replaced with a ton of porn links.
i checked the ftp for this file, but there was just old javascript file without any changes.
yet i go back to check source code via browser and indeed th...
Hello guys,
I need to inline some javascript code into the Smarty template files and these {ldelim} {rdelim} things are killing me. Is there a way to tell smarty to ignore the markup for a block and just output it as is? Something similar to CDATA blocks in the xml?
Just in case: here is how simple javascript looks now:
$(function() ...
my site has lots of incoming searches which is stored in a database to show recent queries into my website. due to high search queries my database is getting bigger in size. so what I want is I need to keep only recent queries in database say 10 records. this keeps my database small and queries will be faster.
I am able to store incomin...
Part I - Solved.
Hi, I'm trying to print some values on the screen from a table but I having a problem, I don't know much about string, vector and array but I think that my problem is related to them.
I'm getting this on the screen
Fatal error: Cannot use [] for reading ...
My code
$sql="SELECT * FROM $tbl_name";
$result=mysql_que...
Hello everyone,
I'm working on "describe table" output to show a list of fields and their types, i want my primary keys to be at top of the list..
I think there's no way to sort describe's results using SQL (something like 'order by') rather than sorting it in PHP.
what do you think guys ?
thanks
...
Hi, I'm doing this:
$.ajax({
type: "POST", url: baseURL+"sys/formTipi_azioni",data:"az_tipo="+azione,
beforeSend: function(){$("#form").html('<p><img src="'+baseURL+'lib/img/ajax-loader.gif" width="16" height="16" alt="loading" /><p>');},
success: function(html){$("#form").html(html);}
});
there is a case when azione ...
code:
<?php
/** PHPExcel */
require_once '../Classes/PHPExcel.php';
/** PHPExcel_IOFactory */
require_once '../Classes/PHPExcel/IOFactory.php';
// Create new PHPExcel object
$objPHPExcel = new PHPExcel();
// Set properties
$objPHPExcel->getProperties()->setCreator("Maarten Balliauw")
...
Hi,
I have esthetic's problem.
Zend Form not in place label value, how to move them that they will be exactly above text box, and not from left?
(I didn't put filters and validation to make this code simpler here)
My Code Login.php form:
public function init()
{
$username = new Zend_Form_Element_Text('username');
$username->setLab...