Jump to content

can an array be a session variable??


markbett

Recommended Posts

im trying the code
[code] while($i<=$guests){
$guest_array[$i] = array(${guest_name.$i}, ${guest_email.$i});
$i++;
}
$_SESSION[guest_array] = $guest_array; // we make the array a seesion variable

echo $_SESSION[guest_array][1][0];
[/code]
and its not working... just wondering if it is because a session variable cannot be an array
Link to comment
https://forums.phpfreaks.com/topic/21036-can-an-array-be-a-session-variable/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.