PHPackages                             ogrrd/csv-iterator - 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. ogrrd/csv-iterator

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

ogrrd/csv-iterator
==================

CSV Reader to array/object iterator with low memory usage and ease of use.

1.3.0(5y ago)660.8k—8.3%3MITPHPPHP &gt;=5.4

Since Feb 25Pushed 5y ago2 watchersCompare

[ Source](https://github.com/ogrrd/csv-iterator)[ Packagist](https://packagist.org/packages/ogrrd/csv-iterator)[ RSS](/packages/ogrrd-csv-iterator/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (4)DependenciesVersions (10)Used By (0)

csv-iterator
============

[](#csv-iterator)

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
------------

[](#installation)

Add this to your composer.json:

```
{
    "require": {
        "ogrrd/csv-iterator": "dev-master"
    }
}
```

Or just type: `composer require ogrrd/csv-iterator`

Usage
-----

[](#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
--------

[](#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
----

[](#todo)

- Unit tests

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE) for more information.

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity35

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 81.6% of commits — single point of failure

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 ~271 days

Recently: every ~364 days

Total

8

Last Release

1833d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6cb43bf554cc2e5ec26bdb63ddd90c631d6c75df5158f18b31719ec03a3c8be3?d=identicon)[ogrrd](/maintainers/ogrrd)

---

Top Contributors

[![ct-owengerrard](https://avatars.githubusercontent.com/u/73701236?v=4)](https://github.com/ct-owengerrard "ct-owengerrard (40 commits)")[![ogrrd](https://avatars.githubusercontent.com/u/4610903?v=4)](https://github.com/ogrrd "ogrrd (5 commits)")[![codeinthehole](https://avatars.githubusercontent.com/u/80975?v=4)](https://github.com/codeinthehole "codeinthehole (2 commits)")[![foxycode](https://avatars.githubusercontent.com/u/1284781?v=4)](https://github.com/foxycode "foxycode (2 commits)")

---

Tags

csviteratorcsvreader

### Embed Badge

![Health badge](/badges/ogrrd-csv-iterator/health.svg)

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

###  Alternatives

[maatwebsite/excel

Supercharged Excel exports and imports in Laravel

12.7k144.3M712](/packages/maatwebsite-excel)[league/csv

CSV data manipulation made easy in PHP

3.5k166.1M646](/packages/league-csv)[rap2hpoutre/fast-excel

Fast Excel import/export for Laravel

2.3k24.9M47](/packages/rap2hpoutre-fast-excel)[openspout/openspout

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

1.2k57.6M131](/packages/openspout-openspout)[sonata-project/exporter

Lightweight Exporter library

44920.9M35](/packages/sonata-project-exporter)[gotenberg/gotenberg-php

A PHP client for interacting with Gotenberg, a developer-friendly API for converting numerous document formats into PDF files, and more!

3685.2M19](/packages/gotenberg-gotenberg-php)

PHPackages © 2026

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