Georgy Georgy - 1 year ago 81
PHP Question

How to print all sessions currently set?

Without having to call each session by name, is there a way to display the contents of all sessions currently set?

Answer Source
echo '<pre>';
echo '</pre>';

Or you can use print_r if you don't care about types. If you use print_r, you can make the second argument TRUE so it will return instead of echo, useful for...

echo '<pre>' . print_r($_SESSION, TRUE) . '</pre>';
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download