note 48018 deleted from function.eval by danbrown

From: Date: Sun, 17 May 2009 20:00:45 +0000
Subject: note 48018 deleted from function.eval by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-155307@lists.php.net to get a copy of this message
Note Submitter: Amedeo ---- It's more easy to write the code to be evaluated if you put it between single quotes: <?php $var = "aaa"; $i = 4; $code = '$ARGS[$i]["GID"] = $var;'; eval($code); echo ("<pre>"); print_r($ARGS); echo ("</pre>"); ?> Which will output Array ( [4] => Array ( [GID] => aaa ) )

« previous php.notes (#155307) next »