I have some csv files being uploaded to my server hourly. I need to take those, and create other files from them. For example.
test.csv has 3 columns worth of data. I want to remove the second column completely, then save the remaining 2 columns as their own file. text_changed.csv
Developing on a linux server, but transfering the site to a windows machine.
Not sure how much the server OS matters here. I know PHP more than any other coding language, but am not a pro.
A CSV file is just an ordinary text file that follows certain conventions. The primary conventions are:
There are a few more rules that you need to fully understand if you were to parse CSV files yourself.
Fortunately, PHP provides some built-in support for reading and working with CSV files. Have a look at:
http://php.net/manual/en/function.fgetcsv.php
http://php.net/manual/en/function.fputcsv.php
You may also want to have a look at the following project:
http://code.google.com/p/php-csv-utils/
Work through the documentation, then post more specific questions here.