Page 1 of 1

Sessions and arrays

Posted: Tue Jun 03, 2003 11:27 am
by RedRasper
Hey all!!

Just a question, been trying to find if its possible to store an array in a session?

Basically I'm going to have some data, but I don't know how much there is going to be.

Could anyone advise?

Cheers
RedRasper

Posted: Tue Jun 03, 2003 12:41 pm
by volka
arrays can be assigned to a member of $_SESSION.

Code: Select all

<?php
session_start();
$_SESSION['myArray'] = array(1,2,3);
?>