Is there a difference between isset
and !empty
. If I do this double boolean check, is it correct this way or redundant? and is there a shorter way
isset()
tests if a variable is set and not null:
http://us.php.net/manual/en/function.isset.php
empty()
can return true when the variable is set to certain values:
http://us.php.net/manual/en/function.empty.php
To demonstrate this, try the following code with $the_var unassigned, set to 0, and set to 1.