I am having trouble pulling values out of a session array. I know that the values are recorded in the session data because I can see it stored on the server:
requesteditems|a:2:{i:0;s:4:"8054";i:1;s:3:"900";}
I want to go through the list of $_SESSION[requesteditems] and create a list:
for ($i = 0; $i <= 30; $i++) {
if (isset($_SESSION[requesteditems][$i])) {
print ("$_SESSION[requesteditems][$i]<br>\n"
;
}
}
The output is not what I expect:
8054
900
Instead, I get:
What am I missing?
requesteditems|a:2:{i:0;s:4:"8054";i:1;s:3:"900";}
I want to go through the list of $_SESSION[requesteditems] and create a list:
for ($i = 0; $i <= 30; $i++) {
if (isset($_SESSION[requesteditems][$i])) {
print ("$_SESSION[requesteditems][$i]<br>\n"

}
}
The output is not what I expect:
8054
900
Instead, I get:
Code:
Array[0]
Array[1]
What am I missing?