Since you have to skip the first element of the list, a for
loop may be better. The code below totals the first column in the rows.
$total = 0;
$trs=$tables->item(0)->getElementsByTagName('tr');
for ($rownum = 1; $rownum < $trs->length; $rownum++) {
$row = $trs->item($rownum);
$td = $row->getElementsByTagName('td')->item(0);
$total += $td->textContent;
}