loop php to scrap all items in a div
require('simple_html_dom.php');
// Website link to scrap
$website = 'http://www.example.com';
// Create DOM from URL or file
$html = file_get_html($website);
// Find content of a div with class = 'xyz'
$divData = $html->find('div[class=xyz]');
// Loop through divData and grab all the links present in it
foreach ($divData as $key => $value) {
$links = $value->find('a');
foreach ($links as $link) {
$linkHref = $link->href;
$linkText = $link->plaintext;
}
}