|  | Posted by thib΄ on 01/13/08 23:01 
plenty900@yahoo.com wrote:> Hi all,
 >
 > I was curious if one can put an array in a session variable.
 > I want to store some search results in such a variable,
 > so it would be an array of objects. However I don't know
 > if that was even the intended purpose of a session variable,
 > and I also don't know how long session variables are held,
 > or if there is a maximum size for a session variable.
 > Can anyone explain?
 >
 > Thanks for any info...
 
 Of course it's possible, sessions are stored server-side and there's
 basically no limitation.
 
 <?php $_SESSION[] = $my_array; ?>
 
 It's just a bidimensional array.
 
 -thibΒ΄
 
 PS you can define a key for the array in the $_SESSION as well.
  Navigation: [Reply to this message] |