$contenttograbimagefrom = $youroriginalhtmlwithimage;
$firstImage = "";
$output = preg_match_all('//i', $contenttograbimagefrom, $ContentImages);
$firstImage = $ContentImages[1] [0]; // To grab the first image
echo $firstImage;
Read more: http://feeds.dzone.com/~r/dzone/snippets/~3/FCytmxuZ_Ug/14559