The manual is written as foreychem passes through the elements and takes out various attributes. I have such a task: the elements were deduced by a zebra, how should I go over them, taking into account the need to remove the data inside one and two ?

 <table id="catalog"> <tbody> <tr class="one"> <tr class="two"> <tr class="one"> <tr class="two"> <tr class="one"> <tr class="two"> <tr class="one"> <tr class="two"> 

Another question: in the process of displaying data on the screen during debugging, tell me where to look as it is more convenient?

    1 answer 1

    Selectors can be composed not only by classes, but also by tags. Read about css.

     $dom = new simple_html_dom(); $dom->load($html); $trs = $dom->find("#catalog tr"); foreach ($trs as $tr) { echo $tr->class; // атрибут "class", т.е. one, two echo $tr->innertext; // html внутри tr $tr->find("что-то"); // поиск внутри tr } 

    About debugging, I did not understand the question. Need more specifics.