check if var initialized?
Moderator: General Moderators
-
Dark_Raider
- Forum Newbie
- Posts: 4
- Joined: Mon May 12, 2003 1:16 pm
check if var initialized?
how do i check if a variable is initialized? i have an array and keep getting uninitialized string offset error. isset, is_null, anything else i can think of, doesnt work. please help.
-
Dark_Raider
- Forum Newbie
- Posts: 4
- Joined: Mon May 12, 2003 1:16 pm
-
Dark_Raider
- Forum Newbie
- Posts: 4
- Joined: Mon May 12, 2003 1:16 pm
there are three levels you might check.
Code: Select all
if ( isset($proj) && is_array($proj) )
{
if ( isset($proj["est"]) && is_array($proj["est"]) )
{
if ( isset($proj["est"][$i]) )
echo $proj["est"][$i];
}
}