note 70178 deleted from function.unset by bjori
| From: | bjori@php.net | Date: | Fri, 27 Oct 2006 10:28:24 +0000 |
| Subject: | note 70178 deleted from function.unset by bjori | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-119178@lists.php.net to get a copy of this message | ||
Note Submitter: w. Patrick Gale
----
If you aren't checking your variables using the 'isset' function, I would suggest not
using the unset function for removing values from global variables such as $_SESSION.
Save yourself the grief and just say:
<?php
$_SESSION = null; // to remove (set to null) everything for the session
// or
$_SESSION['somename'] = null; // to just remove individual session name values whether it
is an array or whatever
?>