Getting content of the node which has childs via DOMDocument
- by altern
I have following html:
<html ><body >Body text <div >div content</div></body></html>
How could I get content of body without nested <div>?
I need to get 'Body text', but do not have a clue how to do this.
result of running
$domhtml = DOMDocument::loadHTML($html);
print…