if (preg_match('/(href|HREF)="?(\S+\.(jpg|png))">?/',$line, $matches)){ $filename[] = $matches[2]; }
-----Original Message----- From: Luis Lebron [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 26, 2003 7:07 AM To: Php-General (E-mail) Subject: [PHP] Grabbing image information from an html string Let say I have an html string that looks like this: <b>Title<b> <img src="graphics/image1.jpg">foo bar bar foo<img src="graphics/image2.jpg">Some more text. I would like to pull the image filenames from the html and end up with something like this $images=array("image1.jpg", "image2.jpg") How can I do this? thanks, Luis R. Lebron Project Manager Sigmatech, Inc -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php