PHPackages                             slad/easy-csv - 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. slad/easy-csv

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

slad/easy-csv
=============

Easy CSV manipulation for PHP 5.4+

0.0.3(10y ago)024MITPHPPHP &gt;=5.4.0

Since Feb 17Pushed 10y ago1 watchersCompare

[ Source](https://github.com/stephylee/easy-csv)[ Packagist](https://packagist.org/packages/slad/easy-csv)[ Docs](http://github.com/jwage/easy-csv)[ RSS](/packages/slad-easy-csv/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependenciesVersions (4)Used By (0)

EasyCSV
=======

[](#easycsv)

EasyCSV is a simple Object Oriented CSV manipulation library for PHP 5.4+

[![Build Status](https://camo.githubusercontent.com/8d11abe0dc9b535cfbe57694807b49070162901390d4738f5fde346605dae228/68747470733a2f2f7365637572652e7472617669732d63692e6f72672f6a776167652f656173792d6373762e706e673f6272616e63683d6d6173746572)](http://travis-ci.org/jwage/easy-csv)[![Scrutinizer Quality Score](https://camo.githubusercontent.com/5a0f746d25a984a0595f7330499c08c65dbee9a00ce34437089a13a10c74a479/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6a776167652f656173792d6373762f6261646765732f7175616c6974792d73636f72652e706e673f733d32646534666237333961353036333066666362633631623632626664613136316163333861666434)](https://scrutinizer-ci.com/g/jwage/easy-csv/)[![Code Coverage](https://camo.githubusercontent.com/5364763f265681463d9aebafa6ddd3e496894cb54860dc4c51fe51c5126178ed/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6a776167652f656173792d6373762f6261646765732f636f7665726167652e706e673f733d65373732363134303338353865316264393762343133356136323265373661303432336563323438)](https://scrutinizer-ci.com/g/jwage/easy-csv/)[![Latest Stable Version](https://camo.githubusercontent.com/2f1727ad0236fa2be7b7615feb52707387a720ec7dfde6e2fc1fb0e896281770/68747470733a2f2f706f7365722e707567782e6f72672f6a776167652f656173792d6373762f762f737461626c652e706e67)](https://packagist.org/packages/jwage/easy-csv)[![Total Downloads](https://camo.githubusercontent.com/2eb4de310c865d833f0f7f6b90094dd1aa7193d6a8993429c858adb5e5b1f16b/68747470733a2f2f706f7365722e707567782e6f72672f6a776167652f656173792d6373762f646f776e6c6f6164732e706e67)](https://packagist.org/packages/jwage/easy-csv)[![Dependency Status](https://camo.githubusercontent.com/2ad6d012160c66930524fdeb68a9ef69e0044f154254e1edbcf9063985ca67fe/68747470733a2f2f7777772e76657273696f6e6579652e636f6d2f7068702f6a776167653a656173792d6373762f312e302e302f62616467652e706e67)](https://www.versioneye.com/php/jwage:easy-csv/1.0.0)

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

[](#installation)

Install via [composer](https://getcomposer.org/):

```
composer require jwage/easy-csv
```

Reader
------

[](#reader)

To read CSV files we need to instantiate the EasyCSV reader class:

```
$reader = new \EasyCSV\Reader('read.csv');
```

You can iterate over the rows one at a time:

```
while ($row = $reader->getRow()) {
    print_r($row);
}
```

Or you can get everything all at once:

```
print_r($reader->getAll());
```

If you have a file with the header in a different line:

```
// our headers aren't on the first line
$reader = new \EasyCSV\Reader('read.csv', 'r+', false);
// zero-based index, so this is line 4
$reader->setHeaderLine(3);
```

Advance to a different line:

```
$reader->advanceTo(6);

```

More in the Reader unit test.

Writer
------

[](#writer)

To write CSV files we need to instantiate the EasyCSV writer class:

```
$writer = new \EasyCSV\Writer('write.csv');
```

You can write a row by passing a commas separated string:

```
$writer->writeRow('column1, column2, column3');
```

Or you can pass an array:

```
$writer->writeRow(array('column1', 'column2', 'column3'));
```

You can also write several rows at once:

```
$writer->writeFromArray(array(
    'value1, value2, value3',
    array('value1', 'value2', 'value3')
));
```

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~440 days

Total

3

Last Release

4003d ago

PHP version history (2 changes)0.0.1PHP &gt;=5.3.0

0.0.2PHP &gt;=5.4.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1814624?v=4)[stephylee](/maintainers/stephylee)[@stephylee](https://github.com/stephylee)

---

Top Contributors

[![jwage](https://avatars.githubusercontent.com/u/97422?v=4)](https://github.com/jwage "jwage (17 commits)")[![jorgecolonconsulting](https://avatars.githubusercontent.com/u/359945?v=4)](https://github.com/jorgecolonconsulting "jorgecolonconsulting (10 commits)")[![adosaiguas](https://avatars.githubusercontent.com/u/1634132?v=4)](https://github.com/adosaiguas "adosaiguas (3 commits)")[![cordoval](https://avatars.githubusercontent.com/u/328359?v=4)](https://github.com/cordoval "cordoval (2 commits)")[![stephylee](https://avatars.githubusercontent.com/u/1814624?v=4)](https://github.com/stephylee "stephylee (2 commits)")[![jeremyFreeAgent](https://avatars.githubusercontent.com/u/176363?v=4)](https://github.com/jeremyFreeAgent "jeremyFreeAgent (1 commits)")[![Nyholm](https://avatars.githubusercontent.com/u/1275206?v=4)](https://github.com/Nyholm "Nyholm (1 commits)")[![royopa](https://avatars.githubusercontent.com/u/442991?v=4)](https://github.com/royopa "royopa (1 commits)")[![korstiaan](https://avatars.githubusercontent.com/u/902842?v=4)](https://github.com/korstiaan "korstiaan (1 commits)")[![harikt](https://avatars.githubusercontent.com/u/120454?v=4)](https://github.com/harikt "harikt (1 commits)")

---

Tags

csvreadwrite

### Embed Badge

![Health badge](/badges/slad-easy-csv/health.svg)

```
[![Health](https://phpackages.com/badges/slad-easy-csv/health.svg)](https://phpackages.com/packages/slad-easy-csv)
```

###  Alternatives

[league/csv

CSV data manipulation made easy in PHP

3.5k182.1M842](/packages/league-csv)[openspout/openspout

PHP Library to read and write spreadsheet files (CSV, XLSX and ODS), in a fast and scalable way

1.2k70.2M232](/packages/openspout-openspout)[shuchkin/simplecsv

Parse and retrieve data from CSV files. Export data to CSV.

52100.9k](/packages/shuchkin-simplecsv)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
