$data = '
<div class="clear"></div>
<div class="photoImg"><img alt="650" src="e43d058fb6424d2dbdc83164146d754f-650.jpg">
</div>
<div class="eventImg">Event</div>
';
我使用函数preg_match()
preg_match('#<div class="photoImg".*?>(.*?)</div>#', $data, $matches);
echo "<pre>";
print_r($matches);
echo "</pre>";
=&GT;结果为null
Array
(
)
如何解决?