Forum Moderators: coopster

Message Too Old, No Replies

Storing An Array In A Session

         

quozt

7:30 pm on Oct 30, 2004 (gmt 0)

10+ Year Member



i have an array full of things but i would like to use it throughout the whole site so how do i store it in a session

at

this script extracts an array

foreach ($pages as $value)

{
$count++;
$_SESSION['$pages["$count"]'] = $value;
}

and sticks it into an array in a session but its not working... any ideas?

mincklerstraat

7:52 pm on Oct 30, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You try:
$_SESSION['pages'] = $pages;

?

jatar_k

8:51 pm on Oct 30, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



or something like

$_SESSION[$pages][$count] = $value;

hard to tell what exactly you need