Download the PHP package morrislaptop/php-parsecsv without Composer
On this page you can find all versions of the php package morrislaptop/php-parsecsv. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package php-parsecsv
parseCSV
Note: parseCSV is now being revised to PHP 5 standards. If you have an issue or a feature request we encourage you to open an issue.
parseCSV is an easy to use PHP class that reads and writes CSV data properly. It fully conforms to the specifications outlined on the on the Wikipedia article. It has many advanced features which help make your life easier when dealing with CSV data.
This library was originaly created in early 2007 by jimeh due to the lack of built-in and third-party support for handling CSV data in PHP.
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.
- Error detection for incorrectly formatted input. It attempts to be intelligent, but can not be trusted 100% due to the structure of CSV, and how different programs like Excel for example outputs CSV data.
- Support for character encoding conversion using PHP's iconv function (requires PHP 5).
- Supports both PHP 4 & 5.
Example Usage
General
Tab delimited, and encoding conversion
Auto-detect delimiter character
Modify data in a CSV file
Add row/entry to end of CSV file
Only recommended when you know the extact sctructure of the file.
Convert 2D array to csv data and send headers to browser to treat output as a file and download it
Credits
- parseCSV is based on the concept of Ming Hong Ng's CsvFileParser class.
Contributors
Please find a complete list on the project's contributors page.
License
(The MIT license)
Copyright (c) 2014 Jim Myhrberg.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.