I\'m trying to parse HTML from loadHTML but I\'m having trouble, I managed to loop through all
Would re-looping work? } EDIT You will also have to check the May not be syntactically 100% correct, but the concept is sound.s in the document but I don\'t know how to loop through
$DOM->loadHTML($url);
$rows= $DOM->getElementsByTagName('tr');
$tds= $DOM->getElementsByTagName('td');
for ($i = 0; $i < $rows->length; $i++) {
// loop through columns
for ($i = 0; $i < $tds->length; $i++) {
// loop through rows
}
parent node
to make sure that the rows
parent is the tr
you are currently in. Something likeif ($rows == tds->parent_node){
// do whatever
}