I have been using empty in forms for some time now. but have just discoveredthat PHP 4 As of PHP 4, The string value "0" is considered empty.If ($string == '') ??
Careful... notice the differenec b/n == and ===....
<?php
$s = 0;
if ($s == '') {
print("==\n");
}
if ($s === '') {
print("===\n");
}
?>
% php foo.php
==
%
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

