Hello: How to parse a div?

Discussion in 'PHP' started by LensFlare, Aug 15, 2011.

  1. #1
    Hello,

    I want to parse only a div from a webpage and I don't know how. Please take a look at http://www.emag.ro/telefoane-mobile/telefon-mobil-samsung-galaxy-mini-s5570steel-grey--pS5570SteelGray and please instruct me how to parse only the price (<div class="pret-produs">). I'm looking forward for a reply. Thank you for your time !

    P.S. English as a second language :)
     
    LensFlare, Aug 15, 2011 IP
  2. freelanceinphp

    freelanceinphp Member

    Messages:
    134
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    48
    #2
    Do you want to fetch price value from this page?
     
    freelanceinphp, Aug 15, 2011 IP
  3. LensFlare

    LensFlare Greenhorn

    Messages:
    6
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    11
    #3
    Yes. Only the price value.
     
    LensFlare, Aug 15, 2011 IP
  4. freelanceinphp

    freelanceinphp Member

    Messages:
    134
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    48
    #4
    freelanceinphp, Aug 15, 2011 IP
  5. Technoslab

    Technoslab Peon

    Messages:
    46
    Likes Received:
    3
    Best Answers:
    3
    Trophy Points:
    0
    #5
    You should have a look at preg_match()
     
    Technoslab, Aug 16, 2011 IP