Categories
Development

Parse a CSV file in PHP

Was trying to move some data from an Outlook 2003 calendar to an older calendaring app (maybe callled Calendar Creator, but not sure).  Exporting and importing data can always be a tricky task.  Luckily this app, was able to import a CSV file, but it had very limiting fields.

So I had to parse the CSV file and combine some of the fields then save it as a new CSV file.  Luckily the fgetcsv() function came to the rescue.  This handy function allows you to parse a CSV file and it returns an array.
 

Leave a Reply

Your email address will not be published. Required fields are marked *