求助 循环不知道原因结束
$ss = array(); foreach($data[0] as $key => $val ){ preg_match('/<A href="([^"]*)"/isU',$val,$href); preg_match('/<a href="([^"]*)"/isU',$val,$href); preg_match('/<IMG src="([^"]*)"/isU',$val,$src); preg_match('/class="a8">(.*)<\/a>/isU',$val,$title); preg_match('/<strong>(.*)<\/strong>/isU',$val,$tuanPrice); preg_match('/<LI>原价:(.*)元<\/LI>/isU',$val,$yuanPrice); preg_match('/class="L_F_2">(.*)折<\/span>/isU',$val,$zheShu); preg_match('/class="a7">(.*)<\/a>/isU',$val,$webName); preg_match('/\'(.*)\'/isU',$val,$time); $src_a = 'http://www.nduotuan.com'.$src[1]; $ss[] = array($title[1],$href[1],$src_a,$tuanPrice[1],$yuanPrice[1],$zheShu[1],$time[1],$webName[1]); //echo "<pre>";print_r($ss); $html=''; } echo "<pre>";print_r($ss);