xProteuSx Posted October 19, 2011 Share Posted October 19, 2011 I am building a website that uses session variables extensively. The site is getting a little complicated, and I am starting to lose track of which session variables are assigned, and what their values are. Is there some way where I can create a piece of code that will display all of the existing session variables and their values? Link to comment https://forums.phpfreaks.com/topic/249377-display-all-session-variable-names-and-values/ Share on other sites More sharing options...
voip03 Posted October 19, 2011 Share Posted October 19, 2011 <?php session_start(); echo "<h3> PHP List All Session Variables</h3>"; foreach ($_SESSION as $key=>$val) echo $key." ".$val."<br/>"; ?> Link to comment https://forums.phpfreaks.com/topic/249377-display-all-session-variable-names-and-values/#findComment-1280450 Share on other sites More sharing options...
xProteuSx Posted October 19, 2011 Author Share Posted October 19, 2011 Phenomenal. Thank you very much. Link to comment https://forums.phpfreaks.com/topic/249377-display-all-session-variable-names-and-values/#findComment-1280452 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.