Extracting Image With PHP
Join the DZone community and get the full member experience.Join For Free
//Extracting Image With PHP
$contenttograbimagefrom = $youroriginalhtmlwithimage; $firstImage = ""; $output = preg_match_all('/credits: 4DLink WebLists and web4link.com
/i', $contenttograbimagefrom, $ContentImages); $firstImage = $ContentImages ; // To grab the first image echo $firstImage;
Opinions expressed by DZone contributors are their own.