Re: How to find <img> tag and get src of image

From: Date: Mon, 24 Apr 2006 06:44:39 +0000
Subject: Re: How to find <img> tag and get src of image
References: 1 2 3 4 5 6 7 8  Groups: php.general 
Request: Send a blank email to php-general+get-234610@lists.php.net to get a copy of this message
Use preg_match_all Think this will work. But i'm for sure no regular expresion guru :) preg_match_all("/src=(.*)\040/i", $Text, $Result); print_r($Result); Gr, Thijs > Hi everybody! > I want to get src of image form a $text, I have a below text > > $Text = <table border="1" cellpadding="3%" cellspacing="3%" > width="100%"> > <tr> <td width="20%"> > <img align="middle" border="0" id=userupload/78/Autumn.jpg > src=userupload/78/Autumn.jpg onClick="javascript:ViewImage(this.id);" > width="100" height="100" > > </td> > <td></td></tr> </table> > </td> > <td class="frame2_middle_right"></td> > </tr> > <tr> > <td class="frame2_bottom_left"></td> > <td class="frame2_bottom_center"> > </td> > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

« previous php.general (#234610) next »