CodeIgniter Forums
print all session variables? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: print all session variables? (/thread-43770.html)



print all session variables? - El Forum - 07-22-2011

[eluser]dadamssg[/eluser]
Is there a way to display all your session variables you have stored?


print all session variables? - El Forum - 07-22-2011

[eluser]talldarkmystere[/eluser]
Have a look at CI's session page: http://ellislab.com/codeigniter/user-guide/libraries/sessions.html

Just a guess here, but you might try the following:

Code:
$sessData = $this->session->userdata();
print_r($sessData);



print all session variables? - El Forum - 07-22-2011

[eluser]dadamssg[/eluser]
yeah i tried that. It appears you have to reference an item when you use $this->session->userdata('item');


print all session variables? - El Forum - 07-22-2011

[eluser]cideveloper[/eluser]
Code:
print_r($this->session->all_userdata());