php to find the content of a div
===

I want to execute some code if a div has an image inside, but can't correctly complete the first line  
(I think other lines are ok):  

    $page = index.php; // should be my homepage
    $content = $page->find('div[id=sky]', 0)->innertext;
    if($content == '<img src="img/water.png">'){
    //do something
    }
