Created
May 17, 2020 14:52
-
-
Save alicanatas/901d0f38c9b37164a3df9cd8128faf93 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$texthtml = 'Who is Sara Bareilles on Sing Off<br> | |
<img alt="Sara" title="Sara" src="475993565.jpg"/><br> | |
<img alt="Sara" title="Sara two" src="475993434343434.jpg"/><br>'; | |
preg_match('/<img.+src=[\'"](?P<src>.+?)[\'"].*>/i', $texthtml, $image); | |
echo $image['src']; | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment