Archive for the ‘PHP’ Category

Store an array in a session

// begin the session
session_start();

// create an array
$my_array=array('blonde', 'girls', 'are', 'stupid');

// put the array in a session variable
$_SESSION['truth']=$my_array;