james_byrne
07-14-2008, 05:53 AM
I would like to replace " in php, when i wrote my replace function to replace \" and it almost works, but the text i am replaceing it with " comes out as \" so i am obviously missing something, i do not want to also replace all \ so can you please help me.
Thanks in advance for the help.
BTW here my code with the outputs.
$content = $_POST['content']'
$replace_me = array("\"","&", "\'");
$replace = array(""","&", "'");
$newphrase = str_replace($replace_me, $replace, $content);
and if i type a " in the box that gets posted as content i get out.
\"
Thanks in advance for the help.
BTW here my code with the outputs.
$content = $_POST['content']'
$replace_me = array("\"","&", "\'");
$replace = array(""","&", "'");
$newphrase = str_replace($replace_me, $replace, $content);
and if i type a " in the box that gets posted as content i get out.
\"