Hi, I'm trying to create a session array and give a dynamic name.
I tried something like this but I get only the last entry i made (key=0) :
[code=php]
$qid = $_POST['pstq'];
$_SESSION[$qid] = array();
foreach ($_SESSION[$qid] as $key=>$value) {
echo "<table><tr><td > $key : </td><td>$value</td></tr>
}
[/code]
and i get this notice
of course I start the session etc.
Thnx.
I tried something like this but I get only the last entry i made (key=0) :
[code=php]
$qid = $_POST['pstq'];
$_SESSION[$qid] = array();
foreach ($_SESSION[$qid] as $key=>$value) {
echo "<table><tr><td > $key : </td><td>$value</td></tr>
}
[/code]
and i get this notice
Code:
Notice: Unknown: Skipping numeric key 0. in Unknown on line 0
Thnx.
Comment