eval problem
| From: | Greg Wineman | Date: | Wed, 03 Jul 2002 02:19:59 +0000 |
| Subject: | eval problem | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-105107@lists.php.net to get a copy of this message | ||
Hello,
Could someone offer some insight on eval(); I am fairly new at this.
I would like to evaluate numerous variables from a form submission with a
loop, but I can;t even get on to work:
I.e.
He are the variables from my form
wins_1=7
losses_1=0
sort_1=1
wins_2=7
losses_2=4
sort_2=2
wins_3=7
losses_3=4
sort_3=3
I am trying to evaluate the values based on a loop. Here's my current
method
$counter=1;
$wins=eval("\$wins_".$counter);
$wins should return 7 in this example. Where am I going wrong?
Any help would be appreciated.
Thanks,
Greg