note 30574 modified in function.stripslashes by chris
| From: | chris@php.net | Date: | Sun, 23 Mar 2003 19:47:54 +0000 |
| Subject: | note 30574 modified in function.stripslashes by chris | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-45695@lists.php.net to get a copy of this message | ||
It seems that this works better:
$string = str_replace("\\", "\", $string);
than this:
$string = stripslashes($string);
I have tested it with strings like: \, \\, \\\, \', \", \t, ', "
And everything works fine!
The code above works if:
magic_quotes_gpc off
--was--
It seems that this works better:
$string = str_replace("\\", "\", $string);
than this:
$string = stripslashes($string);
I have tested it with strings like: \, \\, \\\, \', \", \t, ', "
And everything works fine!
http://www.php.net/manual/en/function.stripslashes.php