note 23484 added to function.unset
| From: | AlberT at SuperAlberT dot it | Date: | Fri, 19 Jul 2002 11:52:50 +0000 |
| Subject: | note 23484 added to function.unset | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-33299@lists.php.net to get a copy of this message | ||
It is absolutely wrong !!
session_unregister() must be NEVER used when you use $_SESSSION superglobal array.
To unset a session variable inside a function use:
unset($GLOBALS['_SESSION']['foo_var']);
--
http://www.php.net/manual/en/function.unset.php
http://master.php.net/manage/user-notes.php?action=edit+23484
http://master.php.net/manage/user-notes.php?action=delete+23484
http://master.php.net/manage/user-notes.php?action=reject+23484