Re: deleting session variables
| From: | CPT John W. Holmes | Date: | Tue, 19 Aug 2003 20:10:42 +0000 |
| Subject: | Re: deleting session variables | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-160074@lists.php.net to get a copy of this message | ||
From: "Tim Winters" <csnm@samplingtechnologies.com>
> Is there a way to wipe out all previous session variables with one
> command?
With register_globals OFF:
$_SESSION = array();
If register_globals is ON and you want to get rid of $val1, $val2, $val3,
etc... then:
foreach($_SESSION as $key => $value)
{ unset($$key); }
---John Holmes...