title: Foreach loop with extra filter -> need to identify last entry
body: <p>I am trying to get the last entry in a foreach loop but struggling so far. My biggest problem is that once inside the foreach loop, I need to filter the array by eliminating every author who has 0 posts. This is my code so far:</p>
  
  <pre><code>$authors = get_users('orderby=nicename');
  
  
  foreach ($authors as $author ) {
        if ( count_user_posts( $author-&gt;id ) &gt;= 1 ) { IF LAST {special &lt;li&gt;} else {normal &lt;li&gt; }
  </code></pre>
  
  <p>Can anyone shed some light on how to get the last entry in this scenario? Thanks</p>