title: PHP foreach, if statement
body: <p>I have a table listing several elements, and their expiration date.</p>
  
  <p>I need a function that says, "If the expiration date is later than today (for each element), then don't show".</p>
  
  <p>It seems pretty simple, but I'm stuck!</p>
  
  <hr>
  
  <p><strong>Edit</strong></p>
  
  <pre><code>&lt;?php foreach($codes-&gt;result_array() as $row):?&gt;
  &lt;tr&gt;
      &lt;td&gt;&lt;?php print $row['description']?&gt;&lt;/td&gt;
      &lt;td&gt;&lt;?php print $row['credits']?&gt;&lt;/td&gt;
      &lt;td&gt;&lt;?php print $row['code']?&gt;&lt;/td&gt;
      &lt;td&gt;&lt;? echo date("F jS, Y", strtotime($row['exp_date']));?&gt;&lt;/td&gt;
      &lt;td&gt;&lt;? echo date("F jS, Y", strtotime($row['create_date']));?&gt;&lt;/td&gt;
      &lt;td&gt;
          &lt;!-- Icons --&gt;
           &lt;a href="&lt;? echo base_url()?&gt;admin/home/editCode/&lt;?php print $row['id']?&gt;" title="Edit"&gt;&lt;img src="&lt;? echo base_url()?&gt;assets/images/icons/pencil.png" alt="Edit" /&gt;&lt;/a&gt;
           &lt;a href="&lt;? echo base_url()?&gt;admin/home/deleteCode/&lt;?php print $row['id']?&gt;" title="Delete" class="delete-code"&gt;&lt;img src="&lt;? echo base_url()?&gt;assets/images/icons/cross.png" alt="Delete" /&gt;&lt;/a&gt; 
      &lt;/td&gt;
  &lt;?php endforeach;?&gt;
  </code></pre>