I would like to get the SRC attribute into a variable in this example:
<img border="0" src="/images/image.jpg" alt="Image" width="100" height="100" />
So for example - I would like to get a variable $foo = "/images/image.jpg"
.
Important! The src attribute will be dynamic, so it mustn't be hardcoded.
Is there any quick and easy way to do this?
Thanks!
EDIT: The image will be a part of a huge string that is basically the content of a news story. So the image is just a part of that.
EDIT2: There will be more images in this string, and I would only want to get the src of the first one. Is this possible?