I have this code:
$body = '<p>awesometext:data</p>';
preg_match_all("/<p>([^<]+)<\/p>/", $body, $matches);
$string = array_map('trim', $matches[1]);
In result I get empty array $string
. How I can fix it?
String can be is more. Example:
$body = '<p>awesometext:data</p><p>othertext:data</p><p>sss:sddd</p>'; //e.t.c