Pjack125 Posted December 5, 2008 Share Posted December 5, 2008 I know this should be easy for most of you but I am having trouble figuring out how to display all the variables i collected across a multi-page form. what I am trying to get is the following output Variable Name = Value and i would like to have that loop until there isn't any more varible in the session. Link to comment https://forums.phpfreaks.com/topic/135665-solved-displaying-all-the-data-colected-in-a-session/ Share on other sites More sharing options...
PFMaBiSmAd Posted December 5, 2008 Share Posted December 5, 2008 Use a foreach() loop to iterate over all elements of an array (which is what $_SESSION is) - http://us2.php.net/foreach Link to comment https://forums.phpfreaks.com/topic/135665-solved-displaying-all-the-data-colected-in-a-session/#findComment-706797 Share on other sites More sharing options...
Prismatic Posted December 5, 2008 Share Posted December 5, 2008 Use a foreach() loop to iterate over all elements of an array (which is what $_SESSION is) - http://us2.php.net/foreach <?php foreach($_SESSION as $key => $val) { echo $key ." => ". $val ."<br />"; } ?> Link to comment https://forums.phpfreaks.com/topic/135665-solved-displaying-all-the-data-colected-in-a-session/#findComment-706803 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.