rap2hpoutre / csv-to-associative-array
CVS to associative array
Installs: 8 858
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 3
Forks: 0
Open Issues: 0
This package is auto-updated.
Last update: 2024-12-05 20:58:51 UTC
README
This package only contains a 587 bytes function: csv_to_associative_array
.
What?
Get your CSV file as an associative array. From this:
name,email
raphael,raphael@example.org
lisa,lisa@example.org
To this:
[ ['name' => 'raphael', 'email' => 'raphael@example.org'], ['name' => 'lisa', 'email' => 'lisa@example.org'] ]
How?
Install via composer
composer require rap2hpoutre/csv-to-associative-array
Use
$content = \Rap2hpoutre\Csv\csv_to_associative_array('path/to/csv/file.csv');