aebstract Posted February 11, 2009 Share Posted February 11, 2009 Is there a way to echo out all $_SESSION['']'s that are active? Example: $_SESSION['var1'] = information; $_SESSION['var2'] = information; $_SESSION['var3'] = information; $_SESSION['var4'] = information; Is there a way to print out that my active session's are var1, var2, var3, var4 ? Link to comment https://forums.phpfreaks.com/topic/144778-solved-quick-session-question/ Share on other sites More sharing options...
rhodesa Posted February 11, 2009 Share Posted February 11, 2009 Is there a way to echo out all $_SESSION['']'s that are active? Example: $_SESSION['var1'] = information; $_SESSION['var2'] = information; $_SESSION['var3'] = information; $_SESSION['var4'] = information; Is there a way to print out that my active session's are var1, var2, var3, var4 ? being that you have been on this forum for a while, I'm going to assume you are looking for something more complicated then using print_r() or array_keys()...what do you mean by 'active'? Link to comment https://forums.phpfreaks.com/topic/144778-solved-quick-session-question/#findComment-759704 Share on other sites More sharing options...
premiso Posted February 11, 2009 Share Posted February 11, 2009 print_r($_SESSION); print_r should do the trick, or even a foreach if you want to format the display. Link to comment https://forums.phpfreaks.com/topic/144778-solved-quick-session-question/#findComment-759706 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.