Monday, 26 August 2013

Session array only echoes last element

Session array only echoes last element References I make my session variable store array like so: $outputs = array(); while($row = mysql_fetch_array($query)) { $_SESSION[\'row_id\'] = $row[\'id\']; $outputs = $row[\'sport_ime\'].\' \'.$row[\'sezona\'].\' Edit
\'; $_SESSION[\'output\'] = $outputs; } and then on another page I call that variable like so: $outputs = $_SESSION[\'output\']; echo ($outputs); It just echoes one row! It is the last entry in my database, why doesn\'t it want to echo everything?

No comments:

Post a Comment