I have this array in PHP session, which I want to step through one step at a time.
How do I get the current array index and move one step forward or backward? Here's the code:
for ($i = 0; $ < 10; $i++){
$result_array[] = $i;
}
$_SESSION['theValue'] = $result_array;
I tried:
$_SESSION['theValue'] [0]++;
to move the array one step at a time, but it only displays the same value at that index. Is there a way I can keep incrementing the index?
I'm not sure I'm making much sense.