title: PHP/MySQL show last updated/most recent date
body: <p>I have a mysql query that brings in a list of results, say 10, each with its own 'last edited' date, and was wondering if it was possible to display/echo/print ONLY the most recent of these dates using php?</p>
  
  <p>Now I know I could do this with a mysql query, but I need to display all of the available results, but only 1 date, (the most recent). </p>
  
  <p>Hope this makes sense. Any help greatly appreciated. S. </p>
  
  <pre><code>&lt;?php                         
                      $availQuery=mysql_query("select * from isavailability");         
                      $availResult=mysql_fetch_array($availQuery);
  
                      $date =  $availResult['editDate'];    
                      $newDate = date('D  dS  F  Y',strtotime($date));
                      $time = date('G:i:s',strtotime($date));
                      echo '&lt;p&gt;This page was last updated on '.$newDate.' at '.$time.'&lt;/p&gt;' . PHP_EOL;                     
  
                      while($availR=mysql_fetch_array($availQuery)) {                                                    
                                  echo '&lt;tr class="rows"&gt;'. PHP_EOL;
                                  echo '&lt;td&gt;&lt;p&gt;'.$availR['title'].'&lt;/p&gt;&lt;/td&gt;'. PHP_EOL;
                                  echo '&lt;td&gt;'; if ($availR['availability']==1) { echo $tick; } else { echo $cross; } echo '&lt;/td&gt;'. PHP_EOL;
                                  echo '&lt;td&gt;'; if ($availR['availability']==2) { echo $tick; } else { echo $cross; } echo '&lt;/td&gt;'. PHP_EOL;
                                  echo '&lt;td&gt;'; if ($availR['availability']==3) { echo $tick; } else { echo $cross; } echo '&lt;/td&gt;'. PHP_EOL;
                                  echo '&lt;/tr&gt;'. PHP_EOL;
                          }
                      ?&gt;  
  </code></pre>