Чтобы использовать класс таблицы CodeIgniter, вот пример того, как вы можете использовать его:
//-- Table Initiation
$tmpl = array (
'table_open' => '<table border="0" cellpadding="0" cellspacing="0">',
'heading_row_start' => '<tr class="heading">',
'heading_row_end' => '</tr>',
'heading_cell_start' => '<th>',
'heading_cell_end' => '</th>',
'row_start' => '<tr>',
'row_end' => '</tr>',
'cell_start' => '<td>',
'cell_end' => '</td>',
'row_alt_start' => '<tr class="alt">',
'row_alt_end' => '</tr>',
'cell_alt_start' => '<td>',
'cell_alt_end' => '</td>',
'table_close' => '</table>'
);
$this->table->set_template($tmpl);
$this->table->set_caption("TABLE TITLE");
//-- Header Row
$this->table->set_heading('ID', 'Date', 'Title', 'Item');
//-- Content Rows
foreach($rows as $index => $row)
{
$this->table->add_row(
anchor("work/fill_form/$row->id", $row->id),
$row->date,
$row->title,
$this->typography->auto_typography($row->item)
);
}
//-- Display Table
$table = $this->table->generate();
echo $table;