how to display next array value on button click?
<p>I have a session array containing lessonid, lesson name and description.</p>

<pre><code>&lt;?php
include "db.php";
$_SESSION['lesson_ids'];
?&gt;


&lt;table&gt;
&lt;tr&gt;&lt;td&gt;Lesson name &lt;/td&gt; &lt;td&gt; description &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;input type="button" name="next" value="next"&gt;
&lt;/table&gt;
</code></pre>

<p>In that session array, I have 3 sets of data. I want to display one lesson in the current page.</p>

<p>When I click next the button, I need to display the next one.</p>

<p>How can this be done?</p>
