Download the PHP package struktal/struktal-csv-reader without Composer
On this page you can find all versions of the php package struktal/struktal-csv-reader. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package struktal-csv-reader
CSVReader for PHP
This is a PHP library to easily read CSV files.
Installation
To install this library, include it in your project using composer:
Usage
Read all entries from a CSV file
To read all entries from a CSV file, use the following code: You can use the `setHeader(bool $header)` method to specify whether the CSV file contains a header or not. If the method is called with `true` as parameter, the first row will be skipped and not returned in the `$data` array. By default, no header is assumed. Instead of explicitly setting the delimiter, you can also use the `detectDelimiter()` method. This method uses the first line of the CSV file to detect which character of `,`, `;`, `\t` or `|` occurs most often and uses it as the delimiter. > Warning: If the first line of the CSV file contains `,`, `;`, `\t` or `|` more often than the actual delimiter, the method will not detect the correct delimiter. As an example, if the CSV file looks like this: the returned `$data` array would be: If you'd call the `setHeader(bool $header)` method with `true` as parameter, the contents of the first row will be omitted from the `$data` array:All versions of struktal-csv-reader with dependencies
PHP Build Version
Package Version
Requires
php Version
>=8.0.0
The package struktal/struktal-csv-reader contains the following files
Loading the files please wait ....