I would like to get this code:
<div class="class1">Any Text<div>Or any other Content</div></div>
to this:
<div class="class1 another_class"><div class="extra"></div>Any Text<div>Or any other Content</div></div>
with the PHP Simple HTML Dom Parser
This is my first part:
foreach($html->find(".class1") as $element) {
$element->class="class1 another_class";
}
But how can I add the "extra"-div?