judahnator/csv
最新稳定版本:v1.0.0
Composer 安装命令:
composer require judahnator/csv
包简介
A simple library to interact with CSV elements
README 文档
README
This library is a super simple abstraction layer for working with CSV files.
Examples
Reading Files
/*
* path/to/file.csv -
* foo,bar
* bing,baz
* one,two
*/
$reader = new \Judahnator\CSV\Reader(new SplFileInfo('path/to/file.csv'));
foreach ($reader as ['foo' => $foo, 'bar' => $bar]) {
echo $foo, ' ', $bar, PHP_EOL;
}
/*
* prints:
* bing baz
* one two
*/
Writing Files
$writer = new \Judahnator\CSV\Writer(new SplFileInfo('path/to/file.csv'));
$writer->write([
['foo', 'bar'],
['bing', 'baz'],
['one', 'two'],
]);
// The file now contains the same as the above example
统计信息
- 总下载量: 7
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-08-25