hello i was wondering when to check for each.
for example, is one better suited to a specific purpose?
maybe like when u submit a form.
if( !is_null(_$POST['submit']) ) //or should i use isset?
{
do_stuff();
}
how about checking for NULL for values returned by a database row.
if( !is_null($row['field']) )
echo "not null value: $row['field']";
Also I remember in ASP/JSP checking to see whether a variable is not null AND is set or not equal to empty string. i forget why this was done, if anyone wants to elaborate on examples where this type of example is useful. something that looks like...
if( !is_null($GET['blah']) && !empty($GET['blah']) )
echo "good value?";
i think in ASP i was checking for null beforehand to see if the variable wasn't set to anything yet and cehcking for the empty string wouldnt shortcircuit an error.