Thứ Ba, 27 tháng 8, 2013

php get first image tag from string

<?php 
preg_match('/(<img[^>]+>)/i', $item['content'], $matches);
echo $matches[0]; 
?>

0 nhận xét:

Đăng nhận xét