|
|
parseCSV is an easy to use PHP class to read and write CSV data properly. It fully conforms to the specifications outlined on the on the Wikipedia article. It has a few advanced features which help make your life easier when dealing with CSV data.
I created this class due to the lack of built-in and third-party support for handling CSV data in PHP.
Please check the Examples page for basic sample code illustrating the use of parseCSV.
Features:
- parseCSV is the only complete and fully featured CSV solution for PHP (as far as i know).
- Supports enclosed values, enclosed commas, double quotes and new lines.
- Automatic delimiter character detection.
- Sort data by specific fields/columns.
- Easy data manipulation.
- Basic SQL-like conditions, offset and limit options for filtering data.
- Support for character encoding conversion using PHP's iconv function (requires PHP 5).
- Supports both PHP 4 & 5.
Planned Features:
- Support negative offset values to offset from end of data rather than beginning.
- More advanced and mature conditions input. Currently it doesn't even support enclosing values in quotes.
- Some decent documentation, specifically regarding conditions syntax.
Credits:
- parseCSV is based on the concept of Ming Hong Ng's CsvFileParser class.
Contact:
If you have any problems, questions or suggestions please create a new issue, or feel free to drop me a mail: jim at zydev dot info
