Session variable encoding : session_decode « Cookie Session « PHP






Session variable encoding

 
<?
session_start();
$_SESSION = array(); 
session_decode( "products|a:2:{i:0;s:8:\"Hal 2000\";i:1;s:6:\"Tardis\";}" );
foreach ( $_SESSION['products'] as $p ) {
  print "$p<br/>\n";
}
?>
  
  








Related examples in the same category