So here’s my code:
function csq($string)
{
$search = array(chr(145),
chr(146),
chr(147),
chr(148),
chr(151),
chr(149),
"•");
$replace = array("'",
"'",
'"',
'"',
'-',
'•',
'•');
return str_replace($search, $replace, $string);
}
$username = csq($_POST["username"]);
$titletag = csq($_POST["titletag"]);
$keywordtag = csq($_POST["keywordtag"]);
$desctag = csq($_POST["desctag"]);
$content = csq($_POST["content"]);
As far as I can tell, each variable should take the post variable of the specified name, and then pass that to the csq() function, which will replace the special characters.
This is not happening. Am I writing something wrong?
Here’s a string:
• Went over key word list that was generated
o Ant1 highlighted approved words
o We should add a column to calculate the ratio between the number of queries vs. the number of results “in parenthesis”
that can be avoid using static
and use array_keys to get the $search
i should have writen my function like: