Codice PHP:
preg_match_all("|<img(.+)>(.*)|Usi",$string,$parts);   
for (
$i=0$icount($parts[0]); $i++) {
//echo $i;  
echo $parts[1][$i]."
"
;