i want to remove the class "refs" that includes references. the page(http://www.sacred-destinations.com/mexico/palenque) from where i m getting the content looks like:
<div class="col-sm-6 col-md-7" id="essay">
<section class="refs">
</section>
</div><!-- end #essay -->
now i am not getting how to remove this 'refs' class as it is enclosed in "section" like something.. here is something that i have done so far...
<?php
$url="http://www.sacred-destinations.com/mexico/palenque";
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_BINARYTRANSFER, true);
$html = curl_exec($ch);
curl_close($ch);
$newDom = new domDocument;
libxml_use_internal_errors(true);
$newDom->loadHTML($html);
libxml_use_internal_errors(false);
$newDom->preserveWhiteSpace = false;
$newDom->validateOnParse = true;
$sections = $newDom->saveHTML($newDom->getElementById('essay'));
$text=$sections->find('<section class="refs">');
$result=removeClass($text);
echo $result;
?>