Whilst I'm fairly okay with relatively simple aspects of php, this has got be defeated.
I have a string that contains, for example, multiple instances of html image code and I would like to break this up into an array, returning just the image filenames. Whilst I've been using various string functions to break up strings previously, there has always been some fairly common text or separators that allow it to work. I'm guessing I need to loop through the string somehow but it's beyond me at the moment.
So, for example:
$string = "<img src='images/directory1/image1.jpg' width = '4' height = '7'/><img src='images/directory2/image2.jpg' width = '6' height = '9'/><img src='images/directory3/image3.jpg' width = '8' height = '11'/>"
As you can see, the directories differ, the dimensions differ and the filenames differ. I would like the array, once populated to read:
=> image1.jpg
=> image2.jpg
=> image3.jpg
Any help would be appreciated!