Re: assigning NULL to a variable

From: Date: Tue, 06 Apr 2004 12:41:04 +0000
Subject: Re: assigning NULL to a variable
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-182456@lists.php.net to get a copy of this message
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;

« previous php.general (#182456) next »