使用preg_replace检索该省略的字符串

I need to fetch the img tag info as well (<img src="images/construction.jpg" border="0" alt="" />) what function and code amendment i need to do as this code im using is in my foreach loop as the data is iterating from the db.

My working Code---

<?php

$content = '<p><img src="images/construction.jpg" border="0" alt="" />This is only a testing phase data</p>';

$content = preg_replace("/<img[^>]+\>/i", "", $content);

echo $content;  //OUTPUT --  This is only a testing phase data

?>

You need to use preg_match to retreive that data instead of preg_replace.