Hello,
I want to parse all the images links from the HTML sting but i am not successfull. I am attaching the code with this message.
String staring with = <img src="/i/
String Ending with = "
By using the function
$chars = preg_split('/<img src="\/i\/"$/', $str, -1, PREG_SPLIT_OFFSET_CAPTURE);
<?php
// I want to get all the images links from the HTML string.
// Result should be
// [0] => lkee_FR._ANGLE.jpg
// [1] => 50TOPBESTBUY.jpg
//-----------------------------------------------------------------
$str = '<P>Maximum runnSpeed: 2000 1/6 </P>
<br clear="all">
<a name="image_1"></a>
<img src="/i/lkee_FR._ANGLE.jpg">
<p>
<p>
<br clear="all">
<img src="/i/50TOPBESTBUY.jpg">
</div>
<p>
</body></html> ';
$chars = preg_split('/<img src="\/i\/"$/', $str, -1, PREG_SPLIT_OFFSET_CAPTURE);
print_r($chars);
?>
Regards,
Imran Khalid
imranlink@hotmail.com