Jump to content

How to echo the results of a session variable array?


Solarpitch

Recommended Posts

It's as simple as this...

[code=php:0]foreach ($_SESSION['quicklist'] as $value){
  echo $value . "<br>\n";
}[/code]

This will echo all values from the $_SESSION['quicklist'] array out.  If you just want to see what's in there, you could always just dump it out using print_r(),

[code=php:0]print_r($_SESSION['quicklist']);[/code]

or alternatively, if you want to find out about the data types too, then use var_dump().

[code=php:0]var_dump($_SESSION['quicklist']);[/code]

Regards
Huggie

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.