Re: Accessing lots of variables
| From: | Andrey Hristov | Date: | Tue, 25 Sep 2001 12:40:43 +0000 |
| Subject: | Re: Accessing lots of variables | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-68694@lists.php.net to get a copy of this message | ||
for ($i=1;$i<36;$i++){
if (${"link".$i}){
// it's real
}else{
// none
}
}
Andrey Hristov
IcyGEN Corporation
http://www.icygen.com
BALANCED SOLUTIONS
----- Original Message -----
From: "Jordan Elver" <jord@theinternetone.co.uk>
To: "PHP General Mailing List" <php-general@lists.php.net>
Sent: Tuesday, September 25, 2001 8:42 PM
Subject: [PHP] Accessing lots of variables
> Hi,
> I'm feeling a bit stupid. I have a,load of variables coming from a MySQL
> connection using list(). The variables are link1 to link 35 inclusive.
>
> How can I access each of these variables, check if they are empty, then add
> them to an array. I don't know how to access then inside a for loop. Can I
> use $link and append the number on the end somehow?
>
> Any help please,
>
> Jord
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>