Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Dec 2006
    Posts
    185
    Thanks
    17
    Thanked 0 Times in 0 Posts

    Get the contents of src in an img tag

    Does anyone know how to get the contents of src in an image tag like for example:
    Code:
    <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
    Last edited by thekevin07; 10-28-2007 at 07:38 AM.

  • #2
    eak
    eak is offline
    Regular Coder eak's Avatar
    Join Date
    Jun 2002
    Location
    Nashville, TN
    Posts
    354
    Thanks
    0
    Thanked 26 Times in 26 Posts
    You could use preg_match.

    How are you with regular expressions?
    eak | "Doing a good deed is like wetting your pants; every one can see the results, but only you can feel the warmth."


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •