Re: addslashes

From: Date: Fri, 21 Jun 2002 23:42:41 +0000
Subject: Re: addslashes
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-103354@lists.php.net to get a copy of this message
PHP is probably escaping the single quotes for you: it's -> it\'s When addslashes() is applied to this, both the backslash character and the single quote are escaped: \ -> \\ ' -> \' The result is what you see: it\'s -> it\\\'s If you strip slashes twice, you'll be back to normal. Chris
When I use addslashes to add a back slash to a single quote, it returns 3 back slashes (example: 'it\\\'s'. Is that correct? Am I doing something wrong?


« previous php.general (#103354) next »