rap2hpoutre / csv-to-associative-array
CSV 转换为关联数组
v0.0.3
2016-06-09 11:29 UTC
This package is auto-updated.
Last update: 2024-09-05 20:29:18 UTC
README
本包仅包含一个 587 字节的功能函数:csv_to_associative_array
。
什么?
将您的 CSV 文件转换为关联数组。从这
name,email
raphael,raphael@example.org
lisa,lisa@example.org
到这
[ ['name' => 'raphael', 'email' => 'raphael@example.org'], ['name' => 'lisa', 'email' => 'lisa@example.org'] ]
如何?
通过 composer 安装
composer require rap2hpoutre/csv-to-associative-array
使用
$content = \Rap2hpoutre\Csv\csv_to_associative_array('path/to/csv/file.csv');