neorang Posted June 1, 2009 Share Posted June 1, 2009 Hi Php masters i need to know how to get multiple image urls in a text like this: blah blah blblbl <img class="image" src="showimage.php?i=47&w=4&t=scr&n=360907130665931"> bleh text text <img src="showimage.php?i=47&w=4&t=scr&n=360907130665931" align="center" whatever="whatever" > blah blah blblbh text .... actually i need to get this : showimage.php?i=47&w=4&t=scr&n=360907130665931 I'll really appreciate if anyone can quickly reply to this thanks Quote Link to comment https://forums.phpfreaks.com/topic/160500-get-src-url/ Share on other sites More sharing options...
anupamsaha Posted June 1, 2009 Share Posted June 1, 2009 Hi Php masters i need to know how to get multiple image urls in a text like this: blah blah blblbl <img class="image" src="showimage.php?i=47&w=4&t=scr&n=360907130665931"> bleh text text <img src="showimage.php?i=47&w=4&t=scr&n=360907130665931" align="center" whatever="whatever" > blah blah blblbh text .... actually i need to get this : showimage.php?i=47&w=4&t=scr&n=360907130665931 I'll really appreciate if anyone can quickly reply to this thanks Not clear enough. Quote Link to comment https://forums.phpfreaks.com/topic/160500-get-src-url/#findComment-846985 Share on other sites More sharing options...
neorang Posted June 1, 2009 Author Share Posted June 1, 2009 omg i forgot to say in preg_match function i need a pattern for preg_match Quote Link to comment https://forums.phpfreaks.com/topic/160500-get-src-url/#findComment-846993 Share on other sites More sharing options...
anupamsaha Posted June 1, 2009 Share Posted June 1, 2009 omg i forgot to say in preg_match function i need a pattern for preg_match Please visit: http://www.phpfreaks.com/forums/index.php/board,43.0.html Quote Link to comment https://forums.phpfreaks.com/topic/160500-get-src-url/#findComment-847000 Share on other sites More sharing options...
laffin Posted June 1, 2009 Share Posted June 1, 2009 <?php $quote=' Hi Php masters i need to know how to get multiple image urls in a text like this: blah blah blblbl <img class="image" src="showimage.php?i=47&w=4&t=scr&n=360907130665931"> bleh text text <img src="showimage.php?i=47&w=4&t=scr&n=360907130665932" align="center" whatever="whatever" > blah blah blblbh text .... actually i need to get this : showimage.php?i=47&w=4&t=scr&n=360907130665931 I\'ll really appreciate if anyone can quickly reply to this thanks'; header('Content-type: text/plain'); if(preg_match_all('/<img\s.*?src=\"(.*?)\".*?>/i',$quote,$matches)) print_r($matches); else echo 'no matches'; ?> Quote Link to comment https://forums.phpfreaks.com/topic/160500-get-src-url/#findComment-847023 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.