RE: [PHP] String Handling
| From: | Jason Murray | Date: | Fri, 25 Aug 2000 07:14:29 +0000 |
| Subject: | RE: [PHP] String Handling | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-13613@lists.php.net to get a copy of this message | ||
> I'm not able to pass strings with " ' " character inside... I always
> find " \' " characters inside even if I use \"<string>\" or
> \'<string>\'
> ....
>
> Wow can I do ?? Help me, please !
You have magic quotes enabled.
You may either switch it off in PHP's config file, or write around it:
if (get_magic_quotes_gpc())
{
// Magic Quotes is ON
$variable = stripslashes($variable);
}
I recommend writing around it, since you can't guarantee that a server
you port your code onto will or will not have MQ enabled.
Jason
--
Jason Murray
jasonm@melbourneit.com.au
Web Design Team, Melbourne IT
Don't believe everything you're foretold.