<html><body>..................<ul class="style5"><li><a href="/profiles/83291221"><img src="/images/252754752" alt="标题标题" />标题标题</a></li><li><a href="/profiles/83291221"><img src="/images/252754752" alt="标题标题" />标题标题</a></li><li><a href="/profiles/83291221"><img src="/images/252754752" alt="标题标题" />标题标题</a></li></ul>................</body></html>
ログイン後にコピー
preg_match_all("|<li><a href=[\"\']\/(.*)\/(.*)[\"\']><img(.*)>(.*)</a></li>|U", $str, $out);$a = $out[2][0];$b = $out[4][0];echo "a::$a , b::$b";
ログイン後にコピー