[PHP] Auto Incrementing a Variable name?

2003-02-25 Thread Jeff Pauls
Hi, I've been playing with this for a while now. Say I had the following variables: $name1 = joe; $name2 = janis; $name3 = joanne; Is there a way in php to increment the variable name not the value? Something like this for ($i = 1; $i = 3; $i++) { $arr_name[$i] = $name.$i; // I

Re: [PHP] Auto Incrementing a Variable name?

2003-02-25 Thread Kevin Stone
Incrementing a Variable name? Hi, I've been playing with this for a while now. Say I had the following variables: $name1 = joe; $name2 = janis; $name3 = joanne; Is there a way in php to increment the variable name not the value? Something like this for ($i = 1; $i = 3; $i++) { $arr_name[$i

Re: [PHP] Auto Incrementing a Variable name?

2003-02-25 Thread Rick Emery
You're on the right track: for ($i = 1; $i = 3; $i++) { $arr_name[$i] = $name$i; // I want $name1,$name2,$name3 etc } - Original Message - From: Jeff Pauls [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, February 25, 2003 3:18 PM Subject: [PHP] Auto Incrementing

Re: [PHP] Auto Incrementing a Variable name?

2003-02-25 Thread Jason k Larson
$name1 = 'Hello, World!'; $i = 1; $var = 'name'.$i; print ${$var}; HTH, Jason k Larson Jeff Pauls wrote: Hi, I've been playing with this for a while now. Say I had the following variables: $name1 = joe; $name2 = janis; $name3 = joanne; Is there a way in php to increment the variable name not the

Re: [PHP] Auto Incrementing a Variable name?

2003-02-25 Thread Jeff Pauls
]; [EMAIL PROTECTED] Sent: Tuesday, February 25, 2003 3:26 PM Subject: Re: [PHP] Auto Incrementing a Variable name? You're on the right track: for ($i = 1; $i = 3; $i++) { $arr_name[$i] = $name$i; // I want $name1,$name2,$name3 etc } - Original Message - From: Jeff Pauls

Re: [PHP] Auto Incrementing a Variable name?

2003-02-25 Thread John Nichel
- From: Rick Emery [EMAIL PROTECTED] To: Jeff Pauls [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, February 25, 2003 3:26 PM Subject: Re: [PHP] Auto Incrementing a Variable name? You're on the right track: for ($i = 1; $i = 3; $i++) { $arr_name[$i] = $name$i; // I want $name1,$name2

Re: [PHP] Auto Incrementing a Variable name?

2003-02-25 Thread Jeff Pauls
- Original Message - From: Jason k Larson [EMAIL PROTECTED] To: Jeff Pauls [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Tuesday, February 25, 2003 3:37 PM Subject: Re: [PHP] Auto Incrementing a Variable name? $name1 = 'Hello, World!'; $i = 1; $var = 'name'.$i; print ${$var}; HTH, Jason k

Re: [PHP] Auto Incrementing a Variable name?

2003-02-25 Thread Leif K-Brooks
] To: Jeff Pauls [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, February 25, 2003 3:26 PM Subject: Re: [PHP] Auto Incrementing a Variable name? You're on the right track: for ($i = 1; $i = 3; $i++) { $arr_name[$i] = $name$i; // I want $name1,$name2,$name3 etc } - Original Message