pbk83 / csimpletable
PHP classes for creating tables
v1.0
2016-04-14 12:31 UTC
Requires
- php: >=5.4
This package is not auto-updated.
Last update: 2026-03-29 02:01:24 UTC
README
Install
SimpleTable can be installed together with Anax - MVC through Composer. Add the following line to composer.json (under require ):
"pbk83/csimpletable": "dev-master"
SimpleTable can then be added as a service in Anax - MVC:
$di->set('SimpleTable', function() use ($di) { $table = new pbk83\SimpleTable\CSimpleTable(); return $table; });
SimpleTable can also be used without Anax - MVC.
Use
Use the method addHeadings($head) to create a header. Example:
addHeadings([’Name’, ’Age’]);
Use the method addRow($row) to add rows to the table. Example:
addRow([’Joe’, ’43’]); addRow([’Jane’, ’45’]);
Use the method createTable() to get the generated html - code.
| Name | Age |
|---|---|
| Joe | 43 |
| Jane | 45 |
Updated