Parse html from loadHTML, how to loop through cols?
<p>I'm trying to parse HTML from loadHTML but I'm having trouble, I managed to loop through all <code>&lt;tr&gt;</code>s in the document but I don't know how to loop through the <code>&lt;td&gt;</code> s on each row.</p>

<p>This is what I did so far:</p>

<pre><code>$DOM-&gt;loadHTML($url);
$rows= $DOM-&gt;getElementsByTagName('tr');

for ($i = 0; $i &lt; $rows-&gt;length; $i++) { // loop through rows
    // loop through columns
    ...
}
</code></pre>

<p>How can I get loop through the columns in each row?</p>
