Hello everyone,
Say I have a string like this:
How would I go about extracting only the <img src="\apple.jpg\" />. Basically, how would I extract the first <img> tag that exists within a given string.PHP Code:$string = "This is a apple. <img src=\"apple.jpg\" /> This is a banana. <img src=\"banana.jpg\" />";



Reply With Quote


Bookmarks