Re: getting all variables from session into array

From: Date: Fri, 13 Apr 2001 14:03:11 +0000
Subject: Re: getting all variables from session into array
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-48443@lists.php.net to get a copy of this message
Does it act as a "normal" array like: $array = array(one => "Number One", two => "Number Two"); How would I go about to make this loop work (if I use the above array it works): while(list($key, $val) = each($HTTP_SESSION_VARS)) echo "$key - $val"; } Regards, // Tobias Talltorp "Rasmus Lerdorf" <rasmus@php.net> wrote in message news:Pine.LNX.4.30.0104130600270.951-100000@rasmus.php.net... > There is already such an array. It is $HTTP_SESSION_VARS > > -Rasmus > > On Fri, 13 Apr 2001, Tobias Talltorp wrote: > > > I know this question has been up here before, but all the searches I did > > turned up with to many or no hits, so I couldn´t find anything. > > > > I want to get all the variables from a session and get them into an array > > like this: > > > > $sessionvar[userid] > > $sessionvar[user] > > $sessionvar[email] > > ... > > > > I think I remember something call vardump or something, but I could´t find > > it in the manual. > > > > Any thoughts? > > // Tobias > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > > For additional commands, e-mail: php-general-help@lists.php.net > > To contact the list administrators, e-mail: php-list-admin@lists.php.net > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#48443) next »