Page 1 of 1

Newbie Question

Posted: Thu Jul 31, 2003 8:30 am
by starsol
When using fopen to create a file, PHP automatically escapes any quotation marks. How can I get around this? I've looked up stripslashes in the PHP manual but at the moment it's way over my head.

Thanks in advance for any help :D

Rupe

Posted: Thu Jul 31, 2003 9:47 am
by m3rajk
it escapes them for a reason. are you sure you want to strip the slashes?

$a=stripslashes($a);
will remove all slashes from $a

umm....

assuming

$a="who's the one who said \"i love you\" first?\nshe's the one.";

then

$a=stripslashes($a);

changes a from

who's the one who said \"i love you\" first?\nshe's the one.

to

who's the one who said "i love you" first?\nshe's the one.

Posted: Thu Jul 31, 2003 11:49 am
by starsol
Thanks :)

The reason I wanted to get rid of them is because the script is writing HTML files based on input from visitors to the website, and the vast majority will include quotation marks at some point.