Hey guys, I'm sure this has been done before, but I haven't found the snippet yet. I think I have to use preg_match_all.
Here's my very simple stopping point:
$content = $obj->introtext;
$xml .= "<ImageUrl><![CDATA[$content]]></ImageUrl>";
Here are two examples of the introtext table data:
<p><span style="font-size: 10pt;"><img src="images/stories/D-West.jpg" alt="D-West" style="margin: 3px; float: right;" width="200" height="300" />Had the Cavaliers played the rest of the schedule...
<p><span style="font-family: arial,helvetica,sans-serif;"><span style="font-size: 10pt;"><img height="237" width="240" src="images/stories/Crystalball.jpg" alt="Crystalball" style="margin: 3px; float: right;" />Quite an Oscar Night for “The Hurt Locker”, as th...
You can see from the above example that not all image urls are going to start with the <img tag and I want to return just the image location like this:
images/stories/D-West.jpg
images/stories/Crystalball.jpg
I'll add the website url later, but for now I just need to learn how to separate the image location from the content.
Any help is appreciated.
Thanks