Incrementing array value in PHP Session variable
<p>I have this array in PHP session, which I want to step through one step at a time.</p>

<p>How do I get the current array index and move one step forward or backward? Here's the code:</p>

<pre><code>for ($i = 0; $ &lt; 10; $i++){    
    $result_array[] = $i;   
}

$_SESSION['theValue'] = $result_array;
</code></pre>

<p>I tried:</p>

<pre><code>$_SESSION['theValue'] [0]++;
</code></pre>

<p>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?</p>

<p>I'm not sure I'm making much sense.</p>
