I must be doing this wrong.
I have this variable which is $cat[$i]['m'] which is different dependent upon whatever the value of $i is.
I want to store this as a session variable which I think I do by
$_SESSION['cat[$i][m]'] = $cat[$i]['m'];
That doesn't work.
$i=2;
echo $_SESSION['cat[$i][m]'];
is different from
echo $_SESSION['cat[2][m]'];
Can someone point me in the right direction?
I have this variable which is $cat[$i]['m'] which is different dependent upon whatever the value of $i is.
I want to store this as a session variable which I think I do by
$_SESSION['cat[$i][m]'] = $cat[$i]['m'];
That doesn't work.
$i=2;
echo $_SESSION['cat[$i][m]'];
is different from
echo $_SESSION['cat[2][m]'];
Can someone point me in the right direction?