Re: Some SESSION Vars not Registering

From: Date: Wed, 23 Jul 2003 20:09:29 +0000
Subject: Re: Some SESSION Vars not Registering
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-156520@lists.php.net to get a copy of this message
From: "Jeff Stillwall" <jstill@audioengine.net> > > Now I'm (possibly) getting somewhere: > > When I modify the function to be this (notice the key name change by adding > "s"): > > function setupUserEnv ($userArray) { > > $_SESSION['loggedIn'] = 1; > > foreach($userArray as $key=>$value) { > echo "Assigning $key = $value<br>"; > $_SESSION[$key."s"] = $value; > } > } Why not just $_SESSION['userArray'] = $userArray; ?? Then $_SESSION['userArray']['fname'] to access the values, for example. ---John Holmes...

« previous php.general (#156520) next »