title: How can I get td values using dom and php
body: <p>I have a table such this :</p>
  
  <pre><code>&lt;table&gt;
  &lt;tr&gt;
      &lt;td&gt;Values&lt;/td&gt;
      &lt;td&gt;5000&lt;/td&gt;
      &lt;td&gt;6000&lt;/td&gt;
  &lt;/tr&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>And I want to get td's content. But I could not manage it.</p>
  
  <pre><code>&lt;?PHP
  $dom = new DOMDocument();
  $dom-&gt;loadHTML("figures.html"); 
  $table = $dom-&gt;getElementsByTagName('table');
  $tds=$table-&gt;getElementsByTagName('td');
  
  foreach ($tds as $t){
     echo $t-&gt;nodeValue, "\n";
  }
  ?&gt;
  </code></pre>