How to get between the div all content with tags.
Example content <div class="wrap"><a href=".."></a><span></span></div>
You need to get <a href=".."></a><span></span> that is, any content between Div
$html = file_get_contents('http://xx.com/'); // создаем новый dom-объект $dom = new domDocument("1.0", "utf-8"); // загружаем html в объект $dom->loadHTML($html); $dom->preserveWhiteSpace = false; $counter = 0; foreach ($dom->getElementsByTagName('header') as $row) { if ($counter++ == 0) continue; echo $row->nodeValue.'<br>'; }