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 3 of 3
  1. #1
    New Coder
    Join Date
    Sep 2011
    Location
    USA
    Posts
    27
    Thanks
    3
    Thanked 1 Time in 1 Post

    How to parse data from a html file?

    I'm trying to learn how to parse data from html file. What functions of php I need to learn for this. Can you please give any guideline?

  • #2
    Master Coder
    Join Date
    Jun 2003
    Location
    Cottage Grove, Minnesota
    Posts
    9,539
    Thanks
    8
    Thanked 1,093 Times in 1,084 Posts
    Because there are so many example, exceptions, and sometimes difficulty in
    getting the parse you want, here are many different methods:
    http://www.google.com/search?q=php+s...gs&btnG=Search

    It all depends on the website, and which data you're going after.


    .

  • #3
    New Coder
    Join Date
    Sep 2011
    Posts
    45
    Thanks
    1
    Thanked 6 Times in 6 Posts
    Regex !
    all the functions of preg_*

    preg_match
    preg_match_all
    preg_split
    ....

    full list of regex functions:
    http://www.php.net/manual/en/ref.pcre.php

    ----

    also few functions that will come in handy
    strpos
    strlen

    full list of all php string functions:
    http://php.net/manual/en/ref.strings.php


  •  

    Tags for this Thread

    Posting Permissions

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