php - How can I exclude first <tr> -


with php dom, getting trs , tds inside.

<?php foreach($table->getelementsbytagname('tr') $tr){    echo $tr->getelementsbytagname('td')->item(0)->nodevalue); } ?> 

can exclude first tr , tds.

i think node list numerically indexed (though cannot test it), using key in foreach may work:

foreach($table->getelementsbytagname('tr') $key => $tr){    // don't act on first element    if ($key > 0) {      echo $tr->getelementsbytagname('td')->item(0)->nodevalue);    } } 

Comments

Popular posts from this blog

delphi - How to convert bitmaps to video? -

jasper reports - Fixed header in Excel using JasperReports -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -