clearing out all $_SESSOIN variables?

This is a discussion on clearing out all $_SESSOIN variables? within the PHP Language forums, part of the PHP Programming Forums category; Hello, In a particular session, I set a bunch of $_SESSION vars. Is there any way of erasing/purging all ...


Go Back   Usenet Forums > PHP Programming Forums > PHP Language

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 10-23-2004
D. Alvarado
 
Posts: n/a
Default clearing out all $_SESSOIN variables?

Hello,
In a particular session, I set a bunch of $_SESSION vars. Is
there any way of erasing/purging all of them in one fell swoop or must
I iterate through each one or even list them out ...

$_SESSION["a"] = "";
$_SESSION["b"] = "";

..... etc.

I'm using PHP 4. Thanks for your help, - Dave
Reply With Quote
  #2 (permalink)  
Old 10-23-2004
Pjotr Wedersteers
 
Posts: n/a
Default Re: clearing out all $_SESSOIN variables?

D. Alvarado wrote:
> Hello,
> In a particular session, I set a bunch of $_SESSION vars. Is
> there any way of erasing/purging all of them in one fell swoop or must
> I iterate through each one or even list them out ...
>
> $_SESSION["a"] = "";
> $_SESSION["b"] = "";
>
> .... etc.
>
> I'm using PHP 4. Thanks for your help, - Dave


$_SESSION = Array ();
HTH
Pjotr


Reply With Quote
  #3 (permalink)  
Old 10-23-2004
Pjotr Wedersteers
 
Posts: n/a
Default Re: clearing out all $_SESSOIN variables?

Pjotr Wedersteers wrote:
> D. Alvarado wrote:
>> Hello,
>> In a particular session, I set a bunch of $_SESSION vars. Is
>> there any way of erasing/purging all of them in one fell swoop or
>> must I iterate through each one or even list them out ...
>>
>> $_SESSION["a"] = "";
>> $_SESSION["b"] = "";
>>
>> .... etc.
>>
>> I'm using PHP 4. Thanks for your help, - Dave

>
> $_SESSION = Array ();
> HTH
> Pjotr


Forgot: or use Session_unset ()


Reply With Quote
  #4 (permalink)  
Old 10-24-2004
Theo
 
Posts: n/a
Default Re: clearing out all $_SESSOIN variables?

"Pjotr Wedersteers" <pjotr@wedersteers.com> wrote in news:417a0a8d$0
$78749$e4fe514c@news.xs4all.nl:

> Pjotr Wedersteers wrote:
>> D. Alvarado wrote:
>>> Hello,
>>> In a particular session, I set a bunch of $_SESSION vars. Is
>>> there any way of erasing/purging all of them in one fell swoop or
>>> must I iterate through each one or even list them out ...
>>>
>>> $_SESSION["a"] = "";
>>> $_SESSION["b"] = "";
>>>
>>> .... etc.
>>>
>>> I'm using PHP 4. Thanks for your help, - Dave

>>
>> $_SESSION = Array ();
>> HTH
>> Pjotr

>
> Forgot: or use Session_unset ()
>
>
>


or use both? I think the manual uses that as an example.
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 08:06 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0