Re: php3 var question
| From: | Phillip Bow | Date: | Thu, 15 Mar 2001 17:35:06 +0000 |
| Subject: | Re: php3 var question | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-6079@lists.php.net to get a copy of this message | ||
Is there any particular reason you don't just use an array for this?
--
phill
""Mize, Robert"" <Robert.Mize@COMPAQ.com> wrote in message
news:29CE62ADC71CD211A4EC00104B7211380984625A@alfexc2.alf.dec.com...
> 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 (http://www.php.net/)
> To unsubscribe, e-mail: php-windows-unsubscribe@lists.php.net
> For additional commands, e-mail: php-windows-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>