var_export() strips slashes

From: Date: Wed, 12 Feb 2003 18:57:55 +0000
Subject: var_export() strips slashes
Groups: php.general 
Request: Send a blank email to php-general+get-135348@lists.php.net to get a copy of this message
Seems that var_export() strips slashes from my array keys even though the docs say that it returns valid PHP code. This is bad if I want to use $b below to define another array, gives a parse error on the single quote in the key. $a = array('it\'s here' => 'single, \' double "'); $b = var_export($a, TRUE); echo $b; Displays: array ( 'it's here' => 'single, \' double "', ) And: $c = eval($b); generates a parse error in the eval'ed code. Any help??? TIA, -Shawn

« previous php.general (#135348) next »