Solarpitch Posted December 21, 2006 Share Posted December 21, 2006 Hey Guys,just wondering how I can echo the results of my session variable array...[code]$_SESSION['quicklist'][] = $_GET['ID'];[/code]Cheers Quote Link to comment https://forums.phpfreaks.com/topic/31519-how-to-echo-the-results-of-a-session-variable-array/ Share on other sites More sharing options...
HuggieBear Posted December 21, 2006 Share Posted December 21, 2006 It's as simple as this...[code=php:0]foreach ($_SESSION['quicklist'] as $value){ echo $value . "<br>\n";}[/code] This will echo all values from the $_SESSION['quicklist'] array out. If you just want to see what's in there, you could always just dump it out using print_r(),[code=php:0]print_r($_SESSION['quicklist']);[/code] or alternatively, if you want to find out about the data types too, then use var_dump().[code=php:0]var_dump($_SESSION['quicklist']);[/code] RegardsHuggie Quote Link to comment https://forums.phpfreaks.com/topic/31519-how-to-echo-the-results-of-a-session-variable-array/#findComment-146026 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.