note 62702 added to language.types.null

From: Date: Tue, 07 Mar 2006 18:37:08 +0000
Subject: note 62702 added to language.types.null
Groups: php.notes 
Request: Send a blank email to php-notes+get-105003@lists.php.net to get a copy of this message
To zola at zolaweb dot com : "It treats NULL as the constant and unsets the variable." It doesn't. As you are trying to find if your variable is empty, your code should be : if (empty ($array['var'])) { $array['var'] = "NULL"; } You know, when "!isset ($var)" is true, $var is already not set... PS : when "$var = '';", $var is set AND is equal to '', the empty string. ---- Server IP: 194.246.101.61 Probable Submitter: 82.235.104.72 ---- X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER autolearn=no version=2.64 ---- Manual Page -- http://www.php.net/manual/en/language.types.null.php Edit -- http://master.php.net/note/edit/62702 Del: integrated -- http://master.php.net/note/delete/62702/integrated Del: useless -- http://master.php.net/note/delete/62702/useless Del: bad code -- http://master.php.net/note/delete/62702/bad+code Del: spam -- http://master.php.net/note/delete/62702/spam Del: non-english -- http://master.php.net/note/delete/62702/non-english Del: in docs -- http://master.php.net/note/delete/62702/in+docs Del: other reasons-- http://master.php.net/note/delete/62702 Reject -- http://master.php.net/note/reject/62702 Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#105003) next »