ogrrd/csv-iterator
最新稳定版本:1.3.0
Composer 安装命令:
composer require ogrrd/csv-iterator
包简介
CSV Reader to array/object iterator with low memory usage and ease of use.
关键字:
README 文档
README
CSV Reader to array/object iterator with low memory usage and ease of use. Mostly useful for importing large CSV files from external APIs.
Installation
Add this to your composer.json:
{
"require": {
"ogrrd/csv-iterator": "dev-master"
}
}
Or just type:
composer require ogrrd/csv-iterator
Usage
Reading data out of a CSV file:
use ogrrd\CsvIterator\CsvIterator; $pathToFile = '/path/to/file.csv'; $delimiter = ','; // optional $rows = new CsvIterator($pathToFile, $delimiter); $rows->useFirstRowAsHeader(); foreach ($rows as $row) { // print_r($row); }
Features
- Set array of values to be used as keys for the rows (must cover all columns)
- Use the values from the first row as the keys for the remaining rows
Todo
- Unit tests
License
The MIT License (MIT). Please see License File for more information.
统计信息
- 总下载量: 58.71k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 7
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-06-07