note 50382 added to function.unset
| From: | franckraynal at free dot fr | Date: | Sat, 26 Feb 2005 13:02:51 +0000 |
| Subject: | note 50382 added to function.unset | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-85579@lists.php.net to get a copy of this message | ||
Here is another way to make 'unset' work with session variables from within a function :
<?php
function unsetSessionVariable ($sessionVariableName) {
unset($GLOBALS[_SESSION][$sessionVariableName]);
}
?>
May it work with others than me...
F.
----
Manual Page -- http://www.php.net/manual/en/function.unset.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+50382
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+50382&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+50382&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+50382&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+50382&report=yes&reason=useless
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+50382&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+50382&report=yes
Search -- http://master.php.net/manage/user-notes.php