Re: is_null
| From: | CC Zona | Date: | Fri, 13 Apr 2001 02:21:09 +0000 |
| Subject: | Re: is_null | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-48390@lists.php.net to get a copy of this message | ||
In article <3AD636CB.8D39C4F5@canada.com>, toxlists@canada.com (Jennifer)
wrote:
> I wanted to use is_null, but it isn't available in my version
> (4.0B2)
>
> What would be an equivalent? I'm fairly new to PHP.
>
> I was using isset, but sometimes it is set to Null.
>
> Null values are unacceptable, but zero is a perfectly acceptable
> value for what I want.
Untested, but I think this should work:
if(empty($val) and $val !==0 and $val !=='')
{
echo 'null';
}
--
CC