Code Yard and PHP CSV Parser
Today i've setup a new project, called Code Yard. All it really is, is a Subversion repository for me to collect all my small random pieces of code (classes,...
Today i’ve setup a new project, called Code YardThis link is dead and no longer works.. All it really is, is a Subversion repository for me to collect all my small random pieces of code (classes, functions, etc.) which i reuse every now and then. It’s purpose is to let me more easily manage all the small pieces of code currently spread out a bit all over the place in old and current projects, and to allow others who might find my code useful, or just save them 5 minutes of work :)
And with that explained, the first piece of code i’ve added is a PHP class called parseCSVThis link is dead and no longer works.. I’ve recently written this class for a small project i’m working on, i was quite surprised to find that there was a quite lack of CSV support in PHP, and an even larger vacuum of 3rd party classes available that fully supports the most common types of CSV files.
Hence i wrote parseCSV to be fully compatible with the Wikipedia article available on the topic. Which also seems to be the exact CSV formatting MS Excel uses for example. I based my class on the processing concept of Ming Hong Ng’s CsvFileParser class.