Try This...
for($i=1; $i<=35; $i++)
{
$sVarName = "link$i";
if(empty($$sVarName))
{
//Do Something
}
else
{
//Do Something Else using $$sVarName...
}
}
-Jason Garber
deltacron.com
At 01:42 PM 9/25/2001 -0400, Jordan Elver wrote:
>Hi,
>I'm feeling a
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 inclusi
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. Ca
3 matches
Mail list logo