title: Checking for last record in PHP
body: <p>How can I implement the part below that I do not want to display on the last result?</p>
  
  <pre><code>&lt;?php foreach ($products-&gt;result() as $row): ?&gt;
      &lt;h3&gt;&lt;?= $row-&gt;header; ?&gt;&lt;/h3&gt;
      &lt;p&gt;&lt;?= $row-&gt;teaser; ?&gt; &lt;/p&gt;
      &lt;a href=""&gt;Read More&lt;/a&gt;    
      &lt;!-- DONT DISPLAY THIS LAST LINE IF ITS THE LAST RECORD --&gt;
      &lt;div class="divider"&gt;&lt;/div&gt;   
   &lt;?php endforeach; ?&gt;
  </code></pre>
  
  <p>Thanks</p>