I am using this code to output all the registered session variables -
echo "<pre>";
print_r($_SESSION);
echo "</pre>";
exit();
This is what I get
Array
(
[language] => english
[navigation] => navigationHistory Object
(
[path] => Array
(
[0] => Array
(
[get] => Array
(
)
[post] => Array
(
)
)
[1] => Array
(
[get] => Array
(
)
[post] => Array
(
[number] => XXXXXXXXXXXX
[x] => 62
)
)
)
)
)
I would like to update the number variable in the [1] Array from XXXXXXXX... to 555555. I tried
$_SESSION['number'] = "55555555555555";
but that just ended up creating a new session variable called number outside the array with the 555.. value and not updating the right one. Can this be done?