Removing a Preceding Backslash from Apostrophes
Posted
by John
on Stack Overflow
See other posts from Stack Overflow
or by John
Published on 2010-04-12T19:19:30Z
Indexed on
2010/04/12
19:23 UTC
Read the original article
Hit count: 298
php
Hello,
When I add a comment using the variable below, apostrophes are printed with a backslash in front of them. How can I get rid of the backslashes?
Thanks in advance,
John
Example of printed result:
My roommate\'s brother\'s ex-girlfriend\'s aunt drive a Toyota.
$comment = mysql_real_escape_string($_POST['comment']);
© Stack Overflow or respective owner