I have the following HTML code:
<div id="hero_techSpec">
<div class="hero_techSpecItem">
blubb
</div>
</div>
Now, I'm trying to remove the inner div-element with "simple HTML DOM parser".
$document = HtmlDomParser::str_get_html("...some HTML code as string...");
$techSpec = $document->find("#hero_techSpec", 0);
echo $techSpec;
$techSpec->find(".hero_techSpecItem", 0)->outertext = '';
echo $techSpec;
$document->load($document->save());
echo $document->find("#hero_techSpec", 0); die;
In all three "echo"s, the inner div is still present. I tried to follow the related solution: Simple HTML Dom: How to remove elements?
However, it seems it is not working in my case. Do you have any ideas / hints how to solve that issue? Thank you!