William Lovaton wrote:
El mar, 06-04-2004 a las 07:41, Marek Kilimajer escribió:
Andy B wrote:
how would you assign NULL to a variable if its original value is ""? otherwise leave it with its value...
if($var === '') $var = NULL;
what about: if ($var == '') unset($var);
No - NULL is not the same as unset() and the condition would evaluate to true even if $var === 0
And if $var = false or null or '0'
-- paperCrane <Justin Patrin>
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php