dev-master
9999999-dev http://bth.seTable management
MIT
The Requires
- php >=5.4
- anax/mvc ^2.0
table education
Wallogit.com
2017 © Pedro PelĂĄez
Table management
CTable is a module for Anax used for creating HTML Tables in an easy manner., (*2)
Install CTable by using composer:, (*3)
composer require donami/ctable
Use an array to create the table:, (*4)
$di->set('HTMLTable', 'donami\CTable\CTable'); $data = array( array('First', 'Second', 'Third'), array('Fourth', 'Fifth', 'Sixth') ); echo $app->HTMLTable->generate($data);
Will output:, (*5)
<table>
<tr>
<td>First</td>
<td>Second</td>
<td>Third</td>
</tr>
<tr>
<td>Fourth</td>
<td>Fifth</td>
<td>Sixth</td>
</tr>
</table>
This is useful when looping through data, (*6)
$di->set('HTMLTable', 'donami\CTable\CTable');
$app->HTMLTable->create_row(array('First', 'Second', 'Third'));
$app->HTMLTable->create_row(array('Fourth', 'Fifth', 'Sixth'));
echo $app->HTMLTable->generate();
Used for customizing the style of the table., (*7)
Example: Set the background of the table to purple, (*8)
$app->HTMLTable->defineTags(array('table_start' => '<table style="background: purple">'));
Links: Packagist: https://packagist.org/packages/donami/ctable, (*9)
Table management
MIT
table education