PHPackages                             air-petr/php-tabulator - 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. air-petr/php-tabulator

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

air-petr/php-tabulator
======================

Tabular data in PHP

v1.0.2(4y ago)05MITPHPPHP &gt;=7.4

Since Feb 4Pushed 4y ago1 watchersCompare

[ Source](https://github.com/Air-Petr/php-tabulator)[ Packagist](https://packagist.org/packages/air-petr/php-tabulator)[ RSS](/packages/air-petr-php-tabulator/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (4)Used By (0)

PHP tabulator
=============

[](#php-tabulator)

Pretty-print the tabular data in various ways.

Instalation
-----------

[](#instalation)

`composer require ar-petr/php-tabulator`

Usage
-----

[](#usage)

You will get a `Tabulator` class with a static interface:

```
use AirPetr\Tabulator;

$body = [
    [1, 'Lila', 'Hevner'],
    [2, 'Florrie', 'Gravie'],
];

$header = ['id', 'first_name', 'last_name'];

echo Tabulator::getPlain($body); // Table without headers
echo Tabulator::getPlain($body, $header); // Table with headers
```

There are different types of output:

### Plain

[](#plain)

```
echo Tabulator::getPlain($data, $headers);

/*
id first_name last_name
 1 Lila       Hevner
 2 Florrie    Gravie
*/
```

### Simple

[](#simple)

```
echo Tabulator::getSimple($data, $headers);

/*
id first_name last_name
-- ---------- ---------
 1 Lila       Hevner
 2 Florrie    Gravie
*/
```

### GitHub

[](#github)

```
echo Tabulator::getGitHub($data, $headers);

/*
| id | first_name | last_name |
| -- | ---------- | --------- |
|  1 | Lila       | Hevner    |
|  2 | Florrie    | Gravie    |
*/
```

More types may be added in the future.

Numbers
-------

[](#numbers)

Columns with numbers are flushed to the left.

```
| ip_address      | age  | account  |
| --------------- | ---- | -------- |
| 219.249.38.228  | 2362 | 12276.68 |
| 197.81.54.113   |   41 |  6496.03 |
| 176.111.139.6   |   64 |  3291.72 |
| 208.178.177.206 |   34 |  4311.57 |

```

Demo
----

[](#demo)

You can see some examples by running scripts from a `demo` folder:

```
php demo/plain.php
php demo/github.php
# etc.
```

Testing
-------

[](#testing)

Run tests by:

`composer test`

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

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

Total

3

Last Release

1557d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/dc29160cfd4432204e4df0fbab4bfcc6e7b1ba471255e64146b93a604c7c8e72?d=identicon)[air-petr](/maintainers/air-petr)

---

Top Contributors

[![Air-Petr](https://avatars.githubusercontent.com/u/15061863?v=4)](https://github.com/Air-Petr "Air-Petr (29 commits)")

---

Tags

formattingtable

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/air-petr-php-tabulator/health.svg)

```
[![Health](https://phpackages.com/badges/air-petr-php-tabulator/health.svg)](https://phpackages.com/packages/air-petr-php-tabulator)
```

###  Alternatives

[wenzhixin/bootstrap-table

An extended table to integration with some of the most widely used CSS frameworks. (Supports Bootstrap, Semantic UI, Bulma, Material Design, Foundation)

11.8k283.4k1](/packages/wenzhixin-bootstrap-table)[mottie/tablesorter

tablesorter (FORK) is a jQuery plugin for turning a standard HTML table with THEAD and TBODY tags into a sortable table without page refreshes. tablesorter can successfully parse and sort many types of data including linked data in a cell.

2.6k223.5k](/packages/mottie-tablesorter)[ramonrietdijk/livewire-tables

Dynamic tables for models with Laravel Livewire

21147.4k](/packages/ramonrietdijk-livewire-tables)[datatables.net/datatables.net

DataTables is a plug-in for the jQuery Javascript library. It is a highly flexible tool, based upon the foundations of progressive enhancement, which will add advanced interaction controls to any HTML table. This is jQuery DataTables

56156.5k25](/packages/datatablesnet-datatablesnet)[gbrock/laravel-table

Table functionality for Laravel models

7644.3k](/packages/gbrock-laravel-table)[fedemotta/yii2-widget-datatables

DataTables widget for Yii2

34179.4k1](/packages/fedemotta-yii2-widget-datatables)

PHPackages © 2026

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