<? $qty = "0" ; if ($qty != "test") print ("qty is not test"); ?>
<? $qty = 0 ; if ($qty != "test") printf("qty is not test"); ?>

I just tested those two lines with php 4.0.6 and they both work.

There is a difference though.
If you set $qty=0; then $qty has no value.
But if you set $qty="0", it has a value.

Type casting is irrelevant in php.

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]

Reply via email to