Description :
Get image / fetch image on text
Function :
$text = 'string or text you want that include image';
if((bool)preg_match('#<img[^>]+src=[\'"]([^\'"]+)[\'"]#', $text, $matches))
{
$image = $matches[1];
}
else
{
$image = '';
}
Tidak ada komentar:
Posting Komentar