rap2hpoutre/csv-to-associative-array

CVS to associative array

Installs: 9 095

Dependents: 0

Suggesters: 0

Security: 0

Stars: 3

Watchers: 1

Forks: 1

Open Issues: 0

pkg:composer/rap2hpoutre/csv-to-associative-array

v0.0.3 2016-06-09 11:29 UTC

This package is auto-updated.

Last update: 2025-10-05 22:57:33 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');