PHPackages                             ziyodulloxon/simple-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. [Utility &amp; Helpers](/categories/utility)
4. /
5. ziyodulloxon/simple-csv

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

ziyodulloxon/simple-csv
=======================

Simple CSV reader/writer

00PHP

Since Apr 3Pushed 1y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

Simple CSV Reader/Writer
------------------------

[](#simple-csv-readerwriter)

### Basic Usage

[](#basic-usage)

[![img.png](img.png)](img.png)

```
$reader = new \Ziyodulloxon\SimpleCsv\Reader("./path/to/file.csv");

$rows = $reader->read();

foreach ($rows as $row) {
    var_dump($row);
}
```

#### Output:

[](#output)

```
[
    0 => 111,
    1 => "+79991234567",
    2 => "John Smith",
],
[
    0 => 112,
    1 => "+79881234568",
    2 => "Jane Doe",
],
[
    0 => 49329,
    1 => "+79771234569",
    2 => "Walter White",
]
```

### Using `associateWithHeaders()` to Use Headers as Keys

[](#using-associatewithheaders-to-use-headers-as-keys)

```
$reader = new \Ziyodulloxon\SimpleCsv\Reader("./path/to/file.csv");

$rows = $reader->associateWithHeaders()->read();

foreach ($rows as $row) {
    var_dump($row);
}
```

#### Output:

[](#output-1)

```
[
    "id_client" => 111,
    "phone" => "+79991234567",
    "name" => "John Smith",
],
[
    "id_client" => 112,
    "phone" => "+79881234568",
    "name" => "Jane Doe",
],
[
    "id_client" => 49329,
    "phone" => "+79771234569",
    "name" => "Walter White",
]
```

### Using `batchRead()` for Large Files

[](#using-batchread-for-large-files)

```
$reader = new \Ziyodulloxon\SimpleCsv\Reader("./path/to/file.csv");

//$iterable is an instance of \Generator
$iterable = $reader->associateWithHeaders()->batchRead(1);

foreach ($iterable as $item) {
    var_dump($item);
}
```

#### Output:

[](#output-2)

Same as above, but with lower memory usage.

###  Health Score

14

—

LowBetter than 2% of packages

Maintenance35

Infrequent updates — may be unmaintained

Popularity0

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity15

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/b5935ba226b1e9960c7fbcad9676d7ee04be2ab75f82dc535496f1ef840faba2?d=identicon)[ziyodulloxon](/maintainers/ziyodulloxon)

---

Top Contributors

[![Ziyodullokhon1992](https://avatars.githubusercontent.com/u/151682908?v=4)](https://github.com/Ziyodullokhon1992 "Ziyodullokhon1992 (10 commits)")

### Embed Badge

![Health badge](/badges/ziyodulloxon-simple-csv/health.svg)

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

###  Alternatives

[ivanovsaleksejs/num-to-text

Converts numbers or prices to text representation in various languages. For example, 437605 becomes "four hundred thirty seven thousand six hundred five". Price class for displaying prices with currencies is also available.

2015.9k](/packages/ivanovsaleksejs-num-to-text)[vildanbina/composer-upgrader

Effortlessly upgrade all Composer dependencies to their latest versions with a single command.

364.7k1](/packages/vildanbina-composer-upgrader)

PHPackages © 2026

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