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

Popular posts from this blog

java - nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet Hibernate+SpringMVC -

sql - Postgresql tables exists, but getting "relation does not exist" when querying -

asp.net mvc - breakpoint on javascript in CSHTML? -