> -----Original Message-----
> From: Paonarong Buachaiyo [mailto:[EMAIL PROTECTED]]
> Sent: 16 October 2002 09:04
> To: [EMAIL PROTECTED]
>
> Simple, how can we earse all $SESSION variable except one or
> two variables.
>
> Any way to do it except
>
> unset($_SESSION['xx1']);
> unset($_SESSION['xx2']);
> unset($_SESSION['xx3']);
> .
> unset($_SESSION['xx10']);
Well, one quick'n'dirty solution would be:
foreach (array('xx1', 'xx2', ..., 'xx10') as $x):
unset $_SESSION[$x];
endforeach;
Cheers!
Mike
---------------------------------------------------------------------
Mike Ford, Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS, LS6 3QS, United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php