PHPackages                             buibr/csv-helper - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [PDF &amp; Document Generation](/categories/documents)
4. /
5. buibr/csv-helper

ActiveLibrary[PDF &amp; Document Generation](/categories/documents)

buibr/csv-helper
================

Parser/Builder of CSV data to file/file to data

v1.7.0(5y ago)18.7k1[1 PRs](https://github.com/buibr/csv-helper/pulls)1BSD-4-ClausePHPCI failing

Since Mar 6Pushed 4mo ago1 watchersCompare

[ Source](https://github.com/buibr/csv-helper)[ Packagist](https://packagist.org/packages/buibr/csv-helper)[ RSS](/packages/buibr-csv-helper/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (10)Dependencies (2)Versions (17)Used By (1)

CSV Helper
==========

[](#csv-helper)

CSV Helper is a robust parser/builder for converting CSV data to arrays and vice versa. This tool is designed for handling large CSV datasets efficiently.

Features
--------

[](#features)

- Parse CSV files into arrays.
- Extract specific columns from CSV files.
- Iterate through CSV records seamlessly.
- Build CSV files from arrays.

Installation
------------

[](#installation)

The preferred method of installing this extension is through [Composer](http://getcomposer.org/download/).

You can install the package by running the following command:

```
composer require --prefer-dist buibr/csv-helper "^1.5"
```

Alternatively, you can add it directly to the `require` section of your `composer.json` file:

```
"require": {
    "buibr/csv-helper": "*"
}
```

Usage
-----

[](#usage)

### Parse CSV Data

[](#parse-csv-data)

#### Get Data as Array

[](#get-data-as-array)

To parse a CSV file and get the data as an array:

```
