Fw: [PHP-WIN] php3 var question

2001-03-15 Thread afan
Try this: $var_1 = "one"; $var_2 = "two"; $var_3 = "three"; for($i=1; $i<4; $i++) { echo"$i. "; echo ${var_ . $i}; echo" "; } - Original Message - From: "Mize, Robert" <[EMAIL PROTECTED]> To: <[EMAIL PROTEC

Re: [PHP-WIN] php3 var question

2001-03-15 Thread Phillip Bow
Is there any particular reason you don't just use an array for this? -- phill ""Mize, Robert"" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > If I have a set of variables named say: > $var_1 > $var_2 > $var_3 > > and I want to use a for loop to do something wi

[PHP-WIN] php3 var question

2001-03-15 Thread Mize, Robert
If I have a set of variables named say: $var_1 $var_2 $var_3 and I want to use a for loop to do something with the variables like: for($i=1; $i<4; $i++){ echo $var_$i; } how do I do this so that $var_$i is interpreted as the variable ($var_1 ect)? Thanks, rob. -- PHP Windows Mailing List (