RE: [PHP] StripSlashes

From: Date: Thu, 10 May 2001 20:33:35 +0000
Subject: RE: [PHP] StripSlashes
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-52349@lists.php.net to get a copy of this message
On 10-May-01 Sterling wrote: > H- > > I'd like to be able to strip the slashes from all the imported > HTTP_POST_VARS. > > I found the $string = stripslashes($string); command. > > But this becomes very tedious if I have 20 vars and I need to code each > one with its own stripslashes line. <snip> not tested, but try something like: while (list ($k, $v) =each ($HTTP_POST_VARS)) { $$k=stripslashes($v); } Regards, -- Don Read dread@texas.net -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it.

« previous php.general (#52349) next »