note 62830 deleted from function.eval by betz
| From: | betz@php.net | Date: | Fri, 10 Mar 2006 16:54:02 +0000 |
| Subject: | note 62830 deleted from function.eval by betz | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-105221@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).