I have HTML with nested <div> tags. I have tried
$doc->find('div div')->unwrap();
and
foreach($doc['div div'] as $div_div)
{
pq($div_div)->unwrap();
}
But this returned the following error:
I need to figure out how to remove the outer-most DIV tag and retain everything inside.
Here is the HTML
<div style="text-align: justify;">
<div style="font-family: Times'; font-size: 13pt; text-align: center;">
ARTICLE 1 - FAMILY, BENEFICIARIES, AND TRUST PURPOSE
</div>
<div style="text-align: justify;">1.1<span class="Apple-tab-span"> </span<b>Family</b>
</div>
</div>
try using contentsUnwrap(),
$doc->find('div div')->contentsUnwrap();