I have this HTML script:
<div class="find-this">I do not need this</div>
<div class="content">
<div class="find-this">I need this</div>
</div>
<div class="content">
<div class="find-this">I need this</div>
<div class="find-this">I need this as well</div>
</div>
So far, I have this:
foreach($html->find('div[class=content]') as $key => $element) :
$result = $html->find('div[class=find-this]', $key)->innertext;
echo $result;
endforeach;
How do I find the find-this
class that is inside the content
class, and not the one above, without knowing how many are inside the needed class and how many are outside? Thank you.