All welcome.

There is such a page structure:

alt text

It is necessary to remove all the "tr" elements that come after zero. (First in a row)

Can you please tell me how to accomplish this using Simple HTML DOM parser?

Sketches:

foreach($html->find('tr') as $value) { $value->outertext = ''; } 

    1 answer 1

    If $html->find('tr') returns an array, then:

     $array = $html->find('tr'); for ($i = 1; $i < count($array); $i++) { $value = $array[$i]; $value->outertext = ''; }