I see a lot of people using a variety of different methods to check whether of a variable is empty, there really seems to be no consensus. I\'ve heard that if($foo)
if($foo)
empty($foo) should return true in all of these cases: 0,"", NULL.
For a more complete list check this page: http://php.net/manual/en/function.empty.php