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" <[EMAIL PROTECTED]>
To: "PHP General Mailing List" <[EMAIL PROTECTED]>
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: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to