chrisullyott / php-csv
CSV-to-array conversion in PHP.
Installs: 71
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/chrisullyott/php-csv
Requires
- php: >=5.3.0
This package is auto-updated.
Last update: 2025-09-20 21:09:45 UTC
README
CSV-to-array conversion in PHP.
Installation
With Composer:
$ composer require chrisullyott/php-csv
Usage
ID | First Name | Last Name |
---|---|---|
15 | Ethan | Hunt |
16 | Jim | Phelps |
17 | Luther | Stickell |
$parser = new CsvParser('/path/to/data.csv');
$items = $parser->getItems();
print_r($items);
Array
(
[0] => Array
(
[id] => 15
[first_name] => Ethan
[last_name] => Hunt
)
[1] => Array
(
[id] => 16
[first_name] => Jim
[last_name] => Phelps
)
[2] => Array
(
[id] => 17
[first_name] => Luther
[last_name] => Stickell
)
)