Thread: CSV conversion

    #1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2000
    Posts
    24
    Rep Power
    0
    Hi all.
    Im trying to convert a CSV file into seperate XML files.
    I have one problem I cant explode the CSV.
    e.g. for each line I need to
    $entry = explode(",", $buffer[$i]);
    However, if an entry has a , in it then this doesnt work.

    Any offers?

    Cheers
    Sparks
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2000
    Posts
    43
    Rep Power
    15
    Not sure if this will help, but the fgetcsv function will parse a CSV file and place each column of every line into an array, which you can then do with as you please!

    ------------------
    PHP, Perl, SQL Programming at http://www.mentalobjects.com

Similar Threads

  1. finding available disk space in C ?
    By Matthew Doucette in forum C Programming
    Replies: 36
    Last Post: May 3rd, 2004, 05:59 PM
  2. how to avoid confuse when write to CSV output format
    By yoyoyoyo in forum Visual Basic Programming
    Replies: 5
    Last Post: March 2nd, 2004, 06:44 PM
  3. sql to csv problem
    By camcim in forum PHP Development
    Replies: 3
    Last Post: April 2nd, 2003, 10:52 AM
  4. sql to csv problem
    By camcim in forum PHP Development
    Replies: 1
    Last Post: April 2nd, 2003, 08:35 AM
  5. Need to use a selected CSV File to be imported
    By Tezza in forum PHP Development
    Replies: 8
    Last Post: March 27th, 2003, 09:05 AM

IMN logo majestic logo threadwatch logo seochat tools logo