Display the first 5 file names using opendir() and $file using PHP
<pre><code>$d = opendir("docs");

while (($file = readdir($d)) !== false) { 

    if (($file != ".") &amp;&amp; ($file != "..")){
        }
}
</code></pre>

<p>I want to be able to display the first 5 file names.</p>

<p>Here is the twist, I have a next  button, which I want to display the next 5 filenames</p>

<p>Thanks
Jean</p>
