|
Posted by Richard Levasseur on 03/11/06 03:23
Not quotes a string index generates an E_NOTICE or something, i forget
which exactly, normally error reporting isn't set to show it. PHP
tries to resolve it as a define()'d constant, then treats it as a
quoted string. Not quoting the string index is generally bad form.
Single quotes provide a small performance gain as php doesn't try to
interpret the string.
For the question at hand:
I'm fairly sure that the callback has to be quoted, when using array
map, that may be the problem. Why are you individually escaping each
'word' of the input? Wouldn't it be easier to just apply it to the
entire $_REQUEST['input'] string?
$queries = array_map( 'mysql_real_escape_string', explode(" ",
$_REQUEST["input"]));
[Back to original message]
|