in cases when "0" is not intended to be empty, here is a simple function to safely test for an empty string (or mixed variable):
<?php
function _empty($string){
$string = trim($string);
if(!is_numeric($string)) return empty($string);
return FALSE;
}
?>