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

Abandoned → [league/csv](/?search=league%2Fcsv)ArchivedLibrary[Utility &amp; Helpers](/categories/utility)

rskuipers/csv
=============

Simple CSV library

1.1.2(11y ago)126MITPHPPHP &gt;=5.3.3

Since Mar 29Pushed 11y ago1 watchersCompare

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

READMEChangelogDependencies (7)Versions (5)Used By (0)

csv
===

[](#csv)

[![Build Status](https://camo.githubusercontent.com/e3602ec20119c2297c06b2dd524770d727b274ddfe177f2528ec6bf531d02cf1/68747470733a2f2f7472617669732d63692e6f72672f72736b7569706572732f6373762e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/rskuipers/csv)

What is it
----------

[](#what-is-it)

This is yet another CSV library, it's made to give you an easy start on reading CSV files. This library allows you to set a row to use as your column titles and access the values using its column title. You can also setup column formatters to parse (localized) currencies, decimals or create your own column formatter.

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

[](#installation)

Add the following line to your composer require

```
"rskuipers/csv": "~1.0.0"
```

Examples
--------

[](#examples)

### Mapping Modes

[](#mapping-modes)

```
ID,Name,Age
1,John,19
2,Doe,21
3,Foo,31
4,Bar,52
```

```
use RSKuipers\CSV\File;

$file = new File($this->getCSVFile(), 0);
$file->setMappingMode(File::COLUMN_TITLES);
$row = $file->fetch();
echo $row['Name'];
```

```
use RSKuipers\CSV\File;

$file = new File($this->getCSVFile(), 0);
$file->setMappingMode(File::INDEX);
$row = $file->fetch();
echo $row[1];
```

```
use RSKuipers\CSV\File;

$file = new File($this->getCSVFile(), 0);
$file->setMappingMode(File::CUSTOM);
$file->setMapping(array(
    'ID',
    'Product Name',
    'Price',
));
$row = $file->fetch();
echo $row['Product Name'];
```

### Column Formatters

[](#column-formatters)

```
ID,Name,Price,Stock
1,Lighter,"€ 15,95","2.093.230"
2,Chair,"€ 17","3.230"
3,Table,"€ 19,91","530",
4,Book,"€ 1","76.126"
```

```
use RSKuipers\CSV\File;
use RSKuipers\CSV\Formatter\Currency as CurrencyFormatter;
use RSKuipers\CSV\Formatter\Decimal as DecimalFormatter;

$priceFormatter = new CurrencyFormatter('nl_NL');
$decimalFormatter = new DecimalFormatter('nl_NL');
$csv = new File($this->getCSVFile(), 0);
$csv->setMappingMode(File::COLUMN_TITLES);
$csv->setFormatter('Price', $priceFormatter);
$csv->setFormatter('Stock', $decimalFormatter);
$row = $csv->fetch();
echo $row['Price']; // 15.95
echo $row['Stock']; // 2093230
```

Tests
-----

[](#tests)

Run Phing to execute PHPLint, PHPCS, PHPMD and PHPUnit. Make sure you used composer install/update with the dev dependencies.

```
$ ./vendor/bin/phing
```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity61

Established project with proven stability

 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.

###  Release Activity

Cadence

Every ~33 days

Total

4

Last Release

4329d ago

### Community

Maintainers

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

---

Top Contributors

[![rskuipers](https://avatars.githubusercontent.com/u/1918518?v=4)](https://github.com/rskuipers "rskuipers (20 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

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

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

###  Alternatives

[symfony/polyfill-iconv

Symfony polyfill for the Iconv extension

1.8k352.7M84](/packages/symfony-polyfill-iconv)[daverandom/libdns

DNS protocol implementation written in pure PHP

16239.1M9](/packages/daverandom-libdns)[avored/module-installer

A composer plugin, to help install modules for AvoREd e commerce applications.

139.1k14](/packages/avored-module-installer)

PHPackages © 2026

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