$table = $PageXpath->query('//table[10]');
$data['tr'] = $table->item(0)->nodeValue;
print_r($data);
Above works. It gives the the text of everything in that table.
However, it does not give me the tr
and td
html mark up. I need all of the TR
elements, marked up. That way I can start dissecting them and passing them each in to a variable.
I need to target that specific table, then do a for each TR
, do X with the first <td>
then Y with the second <td>
then Z with the third <td>
.