note 25045 added to function.unset

From: Date: Mon, 09 Sep 2002 08:00:13 +0000
Subject: note 25045 added to function.unset
Groups: php.notes 
Request: Send a blank email to php-notes+get-36378@lists.php.net to get a copy of this message
I don't use unset() to unset session variables. To destroy all information in $_SESSION I use the following code: $_SESSION = array(); and if I just want to get rid of one variable, then I use: $_SESSION['whatever'] = "NULL"; and that variable will no longer be relevant or test as TRUE in the rest of the script -- http://www.php.net/manual/en/function.unset.php http://master.php.net/manage/user-notes.php?action=edit+25045 http://master.php.net/manage/user-notes.php?action=delete+25045 http://master.php.net/manage/user-notes.php?action=reject+25045

« previous php.notes (#36378) next »