From this <a href="http://simplehtmldom.sourceforge.net" rel="nofollow">Simple Dom Site</a>
From the documentation:
it says:
Code:
if(isset($html->'div#sidebar'))
{
$sidebarFile = 'D:\xampp\htdocs\final\wordpress\sidebar.php';
$openSidebarFile = fopen($sidebarFile,'a');
foreach($html->find('div#sidebar')) as $e)
{
$html ->find('div[id=sidebar]', 0) -> innertext;
$inputSidebar = $e->outertext;
fwrite($openSidebarFile, "\n" .inputSidebar "\n");
}
}
From the documentation:
it says:
Code:
// Determine whether a attribute exist?
if(isset($e->href))
echo 'href exist!';