RE: [PHP] Re: eval()
| From: | Rasmus Lerdorf | Date: | Mon, 21 Jan 2002 04:21:42 +0000 |
| Subject: | RE: [PHP] Re: eval() | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-81320@lists.php.net to get a copy of this message | ||
> while (list($opid, $ppid, $amount, $pname) = mysql_fetch_row($res)) {
> $eval = '$temp["'.$pname.'"] =
> $temp["'.$pname.'"] + '.$amount.';';
> eval($eval);
> $i++;
Whoa... Why not simply:
$temp[$pname] += $amount;
??
-Rasmus