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 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 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
Archived
This topic is now archived and is closed to further replies.