Hi,
After viewing some answers on stackoverflow,
preg_match_all('/<img[^>]+>/i',$html, $result);
$img = array();
foreach( $result[0] as $img_tag)
{
preg_match_all('/(title)=("[^"]*")/i',$img_tag, $img[$img_tag]);
}
//print_r($img);
foreach ($img as $imgg)
echo $imgg[2][0];
The above code finds img title, but however it return as "Waterfall fountain"
instead of Waterfall fountain
, notice there is "
what should i add in regex to remove "
?
Thank you