$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>";
=> 结果为空
Array
(
)
如何解决?