Re: Has anyone else seen this problem on php4.01 patch level 2?

From: Date: Wed, 19 Jul 2000 22:58:54 +0000
Subject: Re: Has anyone else seen this problem on php4.01 patch level 2?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-7352@lists.php.net to get a copy of this message
<ray@skygo.com> wrote in message news:H00000690001a727.0964047146.gateway2.skygo.com@MHS... > > Hi - > > First off, my appologies if this question has already been asked. I > searched the bug database but I could not find it. It isn't a bug ;) . > > I seem to be having a problem with the decoding of url variables. I'm > running php4.01 patch level two with Apache 1.3.12 on Linux and I > noticed the following behavior: > > When I call... > > http://mahi:9080/echo.php?text=ray%27s+car > > it outputs: > ray\'s car It outputs that because ' is a special char, like " and \ (in C, these would be escaped thusly: \' , \" , \\ ). > > i'm expecting: > ray's car Use stripslashes or stripcslashes. <? echo stripslashes("ray\'s car"); ?> will print what you expect. http://www.php.net/manual/function.stripslashes.php http://www.php.net/manual/function.stripcslashes.php -- O.

« previous php.general (#7352) next »