PHP Session Array Value keeps showing as "Array"

Posted by Nerathas on Stack Overflow See other posts from Stack Overflow or by Nerathas
Published on 2010-05-18T17:50:20Z Indexed on 2010/05/18 18:00 UTC
Read the original article Hit count: 160

Filed under:
|

Hello,

When sending data from a form to a second page, the value of the session is always with the name "Array" insteed of the expected number.

The data should get displayed in a table, but insteed of example 1, 2, 3 , 4 i get : Array, Array, Array. (A 2-Dimensional Table is used)

Is the following code below a proper way to "call" upon the stored values on the 2nd page from the array ?

$test1 = $_SESSION["table"][0];
$test2 = $_SESSION["table"][1];
$test3 = $_SESSION["table"][2];
$test4 = $_SESSION["table"][3];
$test5 = $_SESSION["table"][4];

What exactly is this, and how can i fix this? Is it some sort of override that needs to happen?

Best Regards.

© Stack Overflow or respective owner

Related posts about php

Related posts about beginner