note 17192 added to function.session-unregister
| From: | dNwOaSrTdI1N at KcIoNlGuSmPbAuMsH dot ErRrE dot com | Date: | Thu, 29 Nov 2001 06:20:01 +0000 |
| Subject: | note 17192 added to function.session-unregister | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-21416@lists.php.net to get a copy of this message | ||
This one is a little easier to read
and actually will unset() each variable
which can only be done through the
$GLOBALS array from inside a function.
See unset() for complete documentation.
function unreg_vars(){
foreach(func_get_args() as $val){
if(session_is_registered($val)){
session_unregister($val);
unset($GLOBALS[$val]);
}
}
}
If it doesn't work, upgrade.
PHP just keeps gettin' better :o)
--
http://www.php.net/manual/en/function.session-unregister.php
http://master.php.net/manage/user-notes.php?action=edit+17192
http://master.php.net/manage/user-notes.php?action=delete+17192
http://master.php.net/manage/user-notes.php?action=reject+17192