I'm trying to parse HTML from loadHTML but I'm having trouble, I managed to loop through all <tr>
s in the document but I don't know how to loop through the <td>
s on each row.
This is what I did so far:
$DOM->loadHTML($url);
$rows= $DOM->getElementsByTagName('tr');
for ($i = 0; $i < $rows->length; $i++) { // loop through rows
// loop through columns
...
}
How can I get loop through the columns in each row?