Re: = 0 and = "0"

From: Date: Thu, 25 Oct 2001 05:55:28 +0000
Subject: Re: = 0 and = "0"
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-72216@lists.php.net to get a copy of this message
> > If you set $qty=0; then $qty has no value. > > Of course it has a value. No it doesn't have a value. PHP interprets 0 as null. A very easy way for you to check: $value=0; if(!$value) printf("$value doesn't have a value (it didn't even print 0)<br>\n"); $value="0" if($value) printf("$value does have a value if I put "0" instead of 0<br>\n");

« previous php.general (#72216) next »