pbk83 / csimpletable
PHP classes for creating tables
Installs: 12
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Language:HTML
Requires
- php: >=5.4
This package is not auto-updated.
Last update: 2025-02-01 19:48:28 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.
Updated