Re: stripslashes() not striping slashes
| From: | Rasmus Lerdorf | Date: | Thu, 25 Oct 2001 16:00:33 +0000 |
| Subject: | Re: stripslashes() not striping slashes | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-72295@lists.php.net to get a copy of this message | ||
> Anyone has an idea why stripslashes(); doesn't strip slashes?
> I have a form that when it's submitted with a ' sign ads slashes to the
> submit results.
> I'm taking the variable and sending it through stripslashes(); and yet
> the slashes remain.
You are perhaps thinking it does in-place modification of the argument?
ie.
stripslashes($a);
echo $a;
That's not how it works. It returns the stripped string. ie.
$a = stripslashes($a);
echo $a;
-Rasmus