function getImgs($content,$order='all'){
$pattern="/<img.*?src=[\'|\"](.*?(?:[\.gif|\.jpg|\.png]))[\'|\"].*?[\/]?>/";
preg_match_all($pattern,$content,$match);
if(isset($match[1])&&!empty($match[1])){
if($order==='all'){
return $match[1];
}
if(is_numeric($order)&&isset($match[1][$order])){
return $match[1][$order];
}
}
return '';
}