Foo Bar
<div id="c">
Bar
</div>
I want find all object in id="a" and out put is
<div id="a">
<div id="b">
Foo
</div>
<div id="m">
Bar
</div>
</div>
Geat thanks.
Foo Bar
<div id="c">
Bar
</div>
I want find all object in id="a" and out put is
<div id="a">
<div id="b">
Foo
</div>
<div id="m">
Bar
</div>
</div>
Geat thanks.
SimpleHTMLDom is memory consuming solution. It may cause memory leaks. I recommend using DOMDocument and DOMXPath. Then you can fetch all div#a by this way:
$xpath->query('//div[@id = "a"]')
Seems the community has responded to this before as a bad idea. Looks to be other, better ways. Jquery, HTML parsers, etc.