I am an inexperienced programmer with DOM. I need to find out a div to remove it and all the content inside it. I have written the following code to get the div with class "name page_footer_container" . When I m trying to output the finding to test if all is fine, I get following error.
__________________Code_________________________________________
require_once('simple_html_dom.php');
$html = file_get_html($url);
$element=$html->find('div[class=page_footer_container]');
echo $element->outertext;
I get the following message with no result : Notice: Trying to get property of non-object.
Would you please let me know what is the problem and what is the best strategy to remove a div with all of its content.
This section of the page I want to remove :
<div class="page_footer_container" >
<div class="page_footer_content">
<div class="page_footer_liner" ><hr class="page_footer_divider_above">
<div class="page_footer_text" ><a href="url">Click here to read our privacy policy.
<br>
Copyright © 2009-2012 mysite INc</a></div></div>
</div><div class="powered_by" >
<p><a rel="nofollow" href="#" target="_blank">
<img src="" border="0" alt=""></a><br><a rel="nofollow" href="" target="_blank"><strong>KKK</strong></a></p>
</div></div>
Thanks a lot