1 $content = "html代码"; 2 preg_match_all("/(href|src)=(["|']?)([^ "'>]+.(gif|jpg|jpeg|bmp|png))\2/i", $content, $img_array); 3 print_r($img_array);
1 $content = "html代码"; 2 preg_match_all("/(href|src)=(["|']?)([^ "'>]+.(gif|jpg|jpeg|bmp|png))\2/i", $content, $img_array); 3 print_r($img_array);