Page 1 of 1

[SOLVED]' changes to \'

Posted: Mon Jun 07, 2004 3:20 pm
by Cypher87
Hi, I made a scripts which gets text from a textarea (html), but somehow it changes ' into '' is there anyway how I can change this or is str_replace good enough?

This is my code:

Code: Select all

$file = $_POSTї"filename"];
$content = $_POSTї"text"];
$file = fopen($file,"w");
fwrite($file,str_replace("''","'",$content));
fclose($file);

Posted: Mon Jun 07, 2004 3:25 pm
by mudkicker
check out stripslashes().

Posted: Mon Jun 07, 2004 3:29 pm
by Cypher87
Thank you :wink:

Posted: Mon Jun 07, 2004 3:31 pm
by mudkicker
no problem mate ;)