title: Parse HTML table with PHP
body: <p>I have been trying to parse the bottom table on <a href="http://www.waterlevels.gc.ca/cgi-bin/tide-shc.cgi?zone=20&amp;region=1&amp;language=english&amp;station=9635&amp;queryType=predict&amp;year=2012&amp;month=2&amp;day=9&amp;view=table&amp;TZ=PST" rel="nofollow">this</a> site using different tools.  </p>
  
  <p>So far I have had the greatest success using the Simple HTML Dom library, but I still cannot figure out how to parse only that last table.  </p>
  
  <p>So far my code is something along the lines of:</p>
  
  <pre><code>&lt;?php
  
  require('simple_html_dom.php');
  
  $table = array();
  
  $html = file_get_html('http://www.waterlevels.gc.ca/cgi-bin/tide-shc.cgi?zone=20&amp;region=1&amp;   language=english&amp;station=9635&amp;queryType=predict&amp;year=2012&amp;month=2&amp;day=9&amp;view=table&amp;TZ=PST');
  
  foreach($html-&gt;find('tr') as $row) 
  {
  //confused as what to do there to parse only last table in given URL
  }
  
  echo '&lt;pre&gt;';
  print_r($table);
  echo '&lt;/pre&gt;';
  
  ?&gt;
  </code></pre>
  
  <p>If someone has any suggestiong as how to get the library to only parse the last table it would be greatly appreciated.</p>
  
  <p>Thanks</p>