Adding a class to the last row in a foreach loop
<p>HI all, </p>

<p>This code works perfectly printing all 5 results with borders on the bottom of each list item through CSS.</p>

<p>However the last item id like there to be no border.  How could i add a class to the list item on the last iteration?</p>

<pre><code>&lt;?php list($parent) = split('/', $this-&gt;url); ?&gt;
&lt;?php  $last_articles = $this-&gt;find('/news')-&gt;children(array('limit'=&gt;5, 'order'=&gt;'page.created_on DESC')); ?&gt;
&lt;ul id="latest-news"&gt;
&lt;?php foreach ($last_articles as $article): ?&gt;
&lt;li&gt;
&lt;?php echo '&lt;h3&gt;'.$article-&gt;link($article-&gt;title()).'&lt;/h3&gt;'; ?&gt;
&lt;?php echo strip_tags(substr($article-&gt;content(),0,100)).'...'; ?&gt;
&lt;/li&gt;
&lt;?php endforeach; ?&gt;
&lt;/ul&gt;
</code></pre>

<p>Thanks for your help.</p>
