Often, in the past when I wanted to write data to a file I would load up and array, iterate over it, and then insert tab and new line breaks so that I could create a CSV. Well, those days are long gone now that PHP5 has included this awesome [...]
Currently Browsing
Posts Tagged ‘ csv ’
Parsing a CSV File in PHP
Ok so it is one of the most common data files in the world: the CSV (Comma Separated Values). So here is all you need in PHP to extract the data from the file. The data is exploded into an array ($data) and can be accessed via the array index. [...]