0
$data = '
<div class="clear"></div>
<div class="photoImg"><img alt="650" src="e43d058fb6424d2dbdc83164146d754f-650.jpg">
    </div>
<div class="eventImg">Event</div>
';

And I using function preg_match()

preg_match('#<div class="photoImg".*?>(.*?)</div>#', $data, $matches);
echo "<pre>";
print_r($matches);
echo "</pre>";

=> result null

Array
(
)

How to fix it?

linh.gust
  • 51
  • 1
  • 5

0 Answers0