Thanks and sorry about the confusion... true == 1 and false == 0.
To summarize this discussion:

1) Unset variables evaluate to the empty string:

   <?php unset($a); if ($a == "") print "something\n"; ?>

   outputs the string "something"

   <?php unset($a); $b = ""; if ($a == $b) print "something\n"; ?>

   outputs the string "something"

   Note that $a == $b evaluates to true even though
   $a is not set but $b is set.

2) In the condition of a conditional expression the only string that
   evaluates to false is the empty string "". All other strings
   evaluate to true. For example:

   <?php if ("hello") print "something\n"; ?>

   produces output but

   <?php if ("") print "something else\n"; ?> 

   produces no output.

Please let me know if for some reason this is still not correct.

Thanks!

Neil


-- 
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