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

, it should return 743
Analysis Solutions [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
On Tue, Jul 02, 2002 at 10:19:59PM -0400, Greg Wineman wrote:
He are the variables from my form
wins_1=7
losses_1=0
sort_1=1
wins_2=7
losses_2=4

hmm... I must be doing something wrong. This is still returning 000
?
$wins_1=7;
$losses_1=0;
$sort_1=1;
$wins_2=4;
$losses_2=4;
$sort_2=2;
$wins_3=3;
$losses_3=4;
$sort_3=3;
$wins = 0;
for ($counter=1; $counter=3; $counter++) {
$var = \$wins_$counter;
$wins = $wins + $$var;

You da man. Thanks
Analysis Solutions [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
On Tue, Jul 02, 2002 at 11:19:22PM -0400, Analysis Solutions wrote:
Oops. Forgot to escape the $:
$var = \$wins_$counter;
Oops. Forgot my promise to myself to

## 4 matches

##
Mail list logo