This PHP script converts a CSV file to a JSON object. It expects all values to be enclosed in double quotes (") and to be seperated by commas (,)
Make this executable
$ chmod u+x csv2json
Then invoke it from the command line like this
$ csv2json myfile.csv
The script will automatically write the resulting file as myfile.json
- By Hay Kranen: http://www.haykranen.nl
- Fork it on Github: http://github.com/hay/csv2json