Storing Complex Data Types to session : Session Variables « Cookie Session « PHP






Storing Complex Data Types to session

 
<?
    $myarr["0"] = "Sunday";
    $myarr["1"] = "Monday";
    $myarr["2"] = "Tuesday";
    $myarr["3"] = "Wednesday";
    $myarr["4"] = "Thursday";
    $myarr["5"] = "Friday";
    $myarr["6"] = "Saturday";

    $_SESSION["myarr"] = $myarr;
?>
  
  








Related examples in the same category

1.A session variable can be destroyed with a call to session_unregister().
2.Accessing Session Variables
3.Adding Session Data
4.Checking Session Data
5.Reading Session Data
6.Registering Variables with a Session
7.Registering an Array Variable with a Session
8.Storing Complex Data Types in Sessions
9.Storing Simple Data Types in Sessions