Possible Duplicate:
Reference - What does this symbol mean in PHP?
The third line of the following code, works well in my local environment but returns an error on my production server.
What does the &
prefix mean and why is it returning an error on my production server?
Below is my code;
function add_real_escape_string($value) {
if (is_array($value)) {
foreach($value as &$item) {
$item = add_real_escape_string($item);
}
} else {
if (get_magic_quotes_gpc()) {
$value = stripslashes($value);
}
$value = mysql_real_escape_string($value);
}
return $value;
}
The error returned is:
Parse error: syntax error, unexpected '&', expecting T_VARIABLE or '$' in init.php on line 345