pbk83/csimpletable

PHP classes for creating tables

v1.0 2016-04-14 12:31 UTC

This package is not auto-updated.

Last update: 2024-05-25 16:06:52 UTC


README

Build Status Scrutinizer Code Quality Code Coverage

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