Fw: [PHP-DB] Something ease... I guess
| From: | Muhammed Mamedov | Date: | Tue, 16 Dec 2003 13:56:47 +0000 |
| Subject: | Fw: [PHP-DB] Something ease... I guess | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-32077@lists.php.net to get a copy of this message | ||
----- Original Message -----
From: "Muhammed Mamedov" <muhammed@ytm.com.tr>
To: "Nikos Gatsis" <nikos@qbit.gr>
Sent: Tuesday, December 16, 2003 3:56 PM
Subject: Re: [PHP-DB] Something ease... I guess
> you will need dynamic variable construction..
> use this
> for($i=1;$i<5;$++) {
> $tmp = "check".$i;
> echo $$tmp; //will print $check1, 2,3,...
> }
>
> this should work.
>
> Regards,
> Muhammed Mamedov
>
> ----- Original Message -----
> From: "Nikos Gatsis" <nikos@qbit.gr>
> To: "PHP-mailist" <php-db@lists.php.net>
> Sent: Tuesday, December 16, 2003 3:44 PM
> Subject: [PHP-DB] Something ease... I guess
>
>
> > Hello list
> >
> > I have 4 variables, $check1, $check2, $check3, $check4
> >
> > How can i use a for loop to echo each one.
> >
> > (lets say echo $check($i)...)
> >
> > Thanx
> >
> > --
> > PHP Database Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >