PHPackages                             phpe/ctable - 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. phpe/ctable

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

phpe/ctable
===========

Class for HTML table

v1.0(11y ago)016MITHTMLPHP &gt;=5.3

Since Feb 16Pushed 11y ago1 watchersCompare

[ Source](https://github.com/phphille/Ctable)[ Packagist](https://packagist.org/packages/phpe/ctable)[ RSS](/packages/phpe-ctable/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

Ctable
======

[](#ctable)

A html table generator

About
-----

[](#about)

A very light and simple class that genrate a html table from an array with values.

```
PHP 5 >= 5.3.0

```

Introduction
------------

[](#introduction)

Just create an object $ctable = new \\phpe\\HTMLTable\\CTable();

Then, if you want to change the table headers, write the following(if you dont want to, skip it):

$table = $ctable-&gt;setTableHeading('array with names', 'css class name');

To get the html table:

$table = $ctable-&gt;getTable('array with values', 'css class name');

Using anax-mvc
==============

[](#using-anax-mvc)

Make it apart of $Di like:

$di-&gt;setShared('ctable', function() { $ctable = new \\phpe\\HTMLTable\\CTable(); return $ctable; });

Then can you, depenending where in the code you want to reach CTable, reach the class whit either $app or $di; $app-&gt;ctable-&gt;getTable($anArray, 'cssClass'); or $this-&gt;di-&gt;ctable-&gt;getTable($anArray, 'cssClass');

[![Scrutinizer Code Quality](https://camo.githubusercontent.com/f0e801ea2a4c8231acb86f6c094726579d9840a8b07aca8b094978b2ecbad9b6/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f70687068696c6c652f437461626c652f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/phphille/Ctable/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/7e1f1cc603873f10c922b33c42812e51c543d6d625c00c0a72e50304b2a3b393/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f70687068696c6c652f437461626c652f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/phphille/Ctable/?branch=master)[![Build Status](https://camo.githubusercontent.com/6500d65db9f7f0fea00e72daff6a808ddfa42eaaa167f37f4e44f9685a2cb95c/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f70687068696c6c652f437461626c652f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/phphille/Ctable/build-status/master)

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

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

Unknown

Total

1

Last Release

4109d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9724e1db2a2d46f13fa336b6510f7ee82bd7c4475b2d4096ca9426bd28439ac3?d=identicon)[phphille](/maintainers/phphille)

---

Top Contributors

[![phi-per](https://avatars.githubusercontent.com/u/201925622?v=4)](https://github.com/phi-per "phi-per (18 commits)")[![phphille](https://avatars.githubusercontent.com/u/10531841?v=4)](https://github.com/phphille "phphille (3 commits)")

---

Tags

htmltable

### Embed Badge

![Health badge](/badges/phpe-ctable/health.svg)

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

###  Alternatives

[caxy/php-htmldiff

A library for comparing two HTML files/snippets and highlighting the differences using simple HTML.

21320.9M15](/packages/caxy-php-htmldiff)[okipa/laravel-table

Generate tables from Eloquent models.

56752.8k](/packages/okipa-laravel-table)[gbrock/laravel-table

Table functionality for Laravel models

7644.3k](/packages/gbrock-laravel-table)[orchestra/html

HTML Component for Orchestra Platform

40112.6k2](/packages/orchestra-html)

PHPackages © 2026

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