PHP Wordpress add class="last" to last item in menu list
<p>I'm drawing out a listing of menu items inside a wordpress template (header.php) and need to assign a special className to the last menu item in the list. I'm building the list with this code...</p>

<pre><code>$myposts = get_posts();
foreach($myposts as $post) :?&gt; 
&lt;li&gt;&lt;a href="&lt;?php the_permalink(); ?&gt;"&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;&lt;/li&gt;
&lt;?php endforeach; ?&gt;
</code></pre>

<p>I'd like to add this to the last menu item...</p>

<pre><code>&lt;li class="last"&gt;...
</code></pre>
