quillspirit Posted May 9, 2007 Share Posted May 9, 2007 Anyone have a snipping of code to echo all data stored in the current $_SESSION ? I'm a little lost in my own scripting, and need to figure out what is all stored. Thanks Link to comment https://forums.phpfreaks.com/topic/50582-solved-session-array/ Share on other sites More sharing options...
trq Posted May 9, 2007 Share Posted May 9, 2007 print_r($_SESSION); Link to comment https://forums.phpfreaks.com/topic/50582-solved-session-array/#findComment-248693 Share on other sites More sharing options...
chronister Posted May 9, 2007 Share Posted May 9, 2007 <pre> <?php print_r($_SESSION); ?> </pre> This code will output something like this: (Taken from my wife's shopping list database I created) Array ( [list_items] => Array ( [622] => Dish Soap [707] => air freshners [708] => dryer sheets [709] => sponges [686] => keilbossa [699] => bar soap [700] => bath soap [703] => kleenex [704] => bowls [705] => toilet paper [706] => paper towels ) ) Link to comment https://forums.phpfreaks.com/topic/50582-solved-session-array/#findComment-248695 Share on other sites More sharing options...
quillspirit Posted May 9, 2007 Author Share Posted May 9, 2007 Thanks guys. A session_start(); helps too, lol. Link to comment https://forums.phpfreaks.com/topic/50582-solved-session-array/#findComment-248791 Share on other sites More sharing options...
only one Posted May 9, 2007 Share Posted May 9, 2007 $_SESSION=array(); Link to comment https://forums.phpfreaks.com/topic/50582-solved-session-array/#findComment-248801 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.