list images in a directory with php and add a specific class
<p>How can i list images in a folder...(which could be any number) and echo them in a list making the sure the first li has a class of "first" and the the last list item has a class of "last" like so...</p>

<pre><code>&lt;li class="first"&gt;&lt;img src="flowing-rock.jpg" /&gt;&lt;/li&gt;
&lt;li&gt;&lt;img src="stones.jpg" alt="Stones" /&gt;&lt;/li&gt;
&lt;li&gt;&lt;img src="grass-blades.jpg" /&gt;&lt;/li&gt;
&lt;li&gt;&lt;img src="ladybug.jpg" alt="Ladybug" /&gt;&lt;/li&gt;
&lt;li class="last"&gt;&lt;img src="pier.jpg" alt="Pier" /&gt;&lt;/li&gt;
</code></pre>

<p>Any help would be appreciated...</p>
