saradrungta Posted December 11, 2008 Share Posted December 11, 2008 can any one advise how i can store an array in session Quote Link to comment https://forums.phpfreaks.com/topic/136534-solved-session/ Share on other sites More sharing options...
gevans Posted December 11, 2008 Share Posted December 11, 2008 $_SESSION['whatever'] = $yourArray; Quote Link to comment https://forums.phpfreaks.com/topic/136534-solved-session/#findComment-712683 Share on other sites More sharing options...
premiso Posted December 11, 2008 Share Posted December 11, 2008 <?php session_start(); //required before any output on each page you wish to use sessions. $_SESSION['arrayData'] = array("test", "test2"); foreach ($_SESSION['arrayData'] as $data) { echo $data . "<br />"; } ?> Quote Link to comment https://forums.phpfreaks.com/topic/136534-solved-session/#findComment-712690 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.