note 62831 deleted from function.eval by danbrown
| From: | danbrown@php.net | Date: | Sun, 17 May 2009 19:56:28 +0000 |
| Subject: | note 62831 deleted from function.eval by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-155298@lists.php.net to get a copy of this message | ||
Note Submitter: aleosha at yandex dot ru
----
There's a minor mistake in example that shows how to correctly use EVAL with IF statements.
Instead of
$str="\$refer=&\$total".$i.";";
eval($str);
Wich just puts value "total2" in your $refer variable, you should use
$str="\$refer=&\$$total".$i.";";
This one will create the real referrer to the value of $total2 (5, in our case).