Let say I have an html string that looks like this:
bTitleb
img src=graphics/image1.jpgfoo bar bar fooimg
src=graphics/image2.jpgSome 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?
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
-mail)
[EMAIL PROTECTED]
Sent: Tuesday, March 25, 2003 12:39 PM
Subject: RE: [PHP] Grabbing image information from an html string
if (preg_match('/(href|HREF)=?(\S+\.(jpg|png))?/',$line, $matches)){
$filename[] = $matches[2];
}
-Original Message-
From: Luis Lebron [mailto:[EMAIL
3 matches
Mail list logo