note 17192 deleted from function.session-unregister by jimw

From: Date: Tue, 18 Dec 2001 19:29:15 +0000
Subject: note 17192 deleted from function.session-unregister by jimw
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-23148@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)

« previous php.notes (#23148) next »