View Full Version : Get the contents of src in an img tag

10-28-2007, 05:40 AM
Does anyone know how to get the contents of src in an image tag like for example:

<img src="http://path.to/img" id="randomunknownid_imgPhotoView">

the id is made randomly so i dont know what it is but it does contain the text imgPhotoView

the content i need to get in this example using the script would be http://path.to/img

Thanks for the help in advance

10-29-2007, 03:53 PM
You could use preg_match (http://www.php.net/manual/en/function.preg-match.php).

How are you with regular expressions?