Manipulate data from a CSV or XML file

Discussion in 'PHP' started by Fracisc, Feb 20, 2014.

  1. #1
    I have a file (CSV and/or XML) with data I need to display on a site. The first link is the head of the tables and the rest of the lines contain product data.

    What is the easiest way to read that file and be able to select just the matching categories (ie. products from category "shirts")?

    Thanks!
     
    Fracisc, Feb 20, 2014 IP
  2. stephan2307

    stephan2307 Well-Known Member

    Messages:
    1,277
    Likes Received:
    33
    Best Answers:
    7
    Trophy Points:
    150
    #2
    I would import the file into a database first and then display the data from the database. Then you can create a separate script which can import the data.
     
    stephan2307, Feb 20, 2014 IP
  3. DomainerHelper

    DomainerHelper Well-Known Member

    Messages:
    445
    Likes Received:
    20
    Best Answers:
    0
    Trophy Points:
    100
    #3
    Agreed, you will want more flexibility than what a flat-file database can offer so import to MySQL. I will import it for you for a small fee.
     
    DomainerHelper, Feb 20, 2014 IP