【发布时间】:2011-12-14 18:36:52
【问题描述】:
$str = "html code here and img tag";
preg_match_all('~<img ([^>]+)>~i', $str, $matches);
$images = array();
foreach ($matches[1] as $str) {
preg_match_all('~([a-z]([a-z0-9]*)?)=("|\')(.*?)("|\')~is', $str, $pairs);
}
我无法从 IMG 获得 SRC,如何获得想法?
【问题讨论】:
标签: php