note 44447 deleted from function.empty by tomsommer
| From: | tomsommer@php.net | Date: | Thu, 05 Aug 2004 21:22:37 +0000 |
| Subject: | note 44447 deleted from function.empty by tomsommer | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-74090@lists.php.net to get a copy of this message | ||
Note Submitter: jlehman no spam at admin usf dot edu
----
I tried this code (from below)
if(empty($var) && $var!=0)
but if $var isn't declared or $var='' then it doesn't pass this test and you
won't get your error saying it is empty.
I converted it to this and it works like a champ for me when I have fields that might have a zero in
them.
if(empty($var) && !is_numeric($var))
{
echo "empty.";
}