Kodrik, you are picking the wrong person to argue with. ;) > > > 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.
Completely incorrect. > 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"); if() doesn't check for null, it checks for a boolean false condition. Does 0 evaluate to false? Sure it does. So does "" and "0". That doesn't mean they are null. > $value="0" > if($value) printf("$value does have a value if I put "0" instead of 0<br>\n"); That is completely wrong as well. You obviously didn't try your own example. The following all evaluate to false: if(0) if(false) if(null) if("0") if("") But the fact that they all evaluate to false says nothing about whether they are values or not. Just like all of these all evaluate to true: if(1) if(true) if("abc") if(-1) That doesn't mean that 0 == null anymore than it means that 1 == -1. Just because two values both evaluate to the same boolean state does not mean they are one and the same. -Rasmus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]