php - Simple HTML DOM outputs the 'wrong' hierarchy -
im scraping simple html dom , scrape div, span , img do:
$c = $html->find('div, span, img'); echo $c->outertext; this gives me output on page, elements mixed appear on scraped page: div img img img span span img div span etc.
is there way output php statement? first div , span , last img without multiple calls php file of course.
foreach(array('div', 'span', 'img') $name){ $c = $html->find($name); echo $c->outertext; }
Comments
Post a Comment