Stripslashes & addslashes question ...

From: Date: Sat, 23 Mar 2002 07:58:46 +0000
Subject: Stripslashes & addslashes question ...
Groups: php.general 
Request: Send a blank email to php-general+get-89823@lists.php.net to get a copy of this message
Hi, can someone tell me why the following results in evaluated variables with 2 slashes in front of apostrophys instead of one and how I can modify it to only add 1? Thanks! foreach($_POST as $k=>$v){ if (get_magic_quotes_gpc()){ $_POST[$k] = stripslashes($v); } $_POST[$k] = addslashes($v); eval( "\$$k = \"$_POST[$k]\";" ); } --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.338 / Virus Database: 189 - Release Date: 3/14/02

« previous php.general (#89823) next »