jduffell Posted March 29, 2009 Share Posted March 29, 2009 Hi is it possible to place two values within a session. For example to create a session with 1 item i'm using, $_SESSION['name'] = $Row['leftleg']; However would it be possible to display the values of $Row['leftleg'] & $Row['rightleg'] within the same session ? anyhelp welcome Link to comment https://forums.phpfreaks.com/topic/151570-session/ Share on other sites More sharing options...
MadTechie Posted March 29, 2009 Share Posted March 29, 2009 Yep.. lots of ways the easy option is Option #1 $_SESSION['name']['leftleg'] = $Row['leftleg']; $_SESSION['name']['rightleg'] = $Row['rightleg']; Option #1 (yes this is still option 1) $_SESSION['name'] = array('leftleg' => $Row['leftleg'], 'rightleg' => $Row['rightleg']); to get the data echo $_SESSION['name']['leftleg']; echo $_SESSION['name']['rightleg']; Link to comment https://forums.phpfreaks.com/topic/151570-session/#findComment-796044 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.