A 2D array wrapper with methods for operating on, importing & exporting tabular data

This project is maintained by smrtr

Getting Started

Previous: Overview

Download DataGrid

Download the master zip from github

All of the code is version controlled under git and hosted at github, which you can browse online. This download includes the source files and the unit tests.

Note: The contents of the tests folder are not required for DataGrid to work.

Or Build from Git

Alternatively, if you have access to git, you can connect to the repository here:

git clone git://

Or Install with Composer

The best way to use Smrtr DataGrid in your application is to define it as a dependency with composer.

    "require": {
        "smrtr/datagrid": ">=1.3.2"

Run composer install or composer update --prefer-source to have composer download the Smrtr DataGrid files and generate an autoload.php.

Include the Class

To use DataGrid you just need to include one file in your PHP script:

require_once 'smrtr-datagrid/DataGrid.php';

or, if installed with composer:

require_once 'vendor/autoload.php';

Then instantiate the class:

$Grid = new \Smrtr\DataGrid;

Test Data

To help you get started DataGrid comes bundled with a 500 row CSV file inside tests/application/input called directgov_external_search_2012-02-05.csv.

To quickly have a play with it you can load the test data into a Smrtr Datagrid instance like so:

$Grid = new \Smrtr\DataGrid;

Next: Keys & Labels