include('/simple_html_dom.php'); $url = $_GET[u]; $html = file_get_html($url); $listallurl = array(0 => 'http://www.domain.com'); foreach($html->find('a[class=product_title]') as $element) { $smallfish = $element->href; array_push($listallurl, $smallfish); } foreach($listallurl as $urls) { $html = file_get_html($urls); $listalltitle = array(); foreach($html->find('div[id=catch_name]') as $e) { $title = $e->children(0)->innertext; array_push($listalltitle, $title); } print_r($listalltitle); }