[thelist] is_null php
Chris W. Parker
cparker at swatgear.com
Tue Jul 29 19:05:12 CDT 2003
Tom Dell'Aringa <mailto:pixelmech at yahoo.com>
on Tuesday, July 29, 2003 4:51 PM said:
> Not sure and I cannot find the scriptlet on how you check (isn't is a
> server variable?) anyway I'm pretty sure its the latest.
php_info() i think?
> Regardless - is my code correct? If not what is the correct way to
> deal with that?
Looks ok. But that doesn't mean the variable actually contains a null
value. Try setting it to NULL before you do perfomr the if().
$var = NULL;
if(is_null($var))
{
echo "yo adrian! i'm NULL!";
}
else
{
echo "couldn't think of anything funny to put here";
}
That will help you determine if you're at least using it correctly.
Chris.
More information about the thelist
mailing list