Here is an example showing how you can create a table from a
multi-dimensional array. Note that the first array index will become the
table heading (or you can set your own headings using the set_heading()
method described in the function reference below).

Here is an example of a table created from a database query result. The
table class will automatically generate the headings based on the table
names (or you can set your own headings using the set_heading()
method described in the class reference below).

If you would like to set an individual cell’s tag attributes, you can use an associative array for that cell.
The associative key data defines the cell’s data. Any other key => val pairs are added as key=’val’ attributes to the tag:

This method takes a one-dimensional array as input and creates a multi-dimensional array with a depth equal to the number of columns desired.
This allows a single array with many elements to be displayed in a table that has a fixed column count. Consider this example:

$list=array('one','two','three','four','five','six','seven','eight','nine','ten','eleven','twelve');$new_list=$this->table->make_columns($list,3);$this->table->generate($new_list);// Generates a table with this prototype<tableborder="0"cellpadding="4"cellspacing="0"><tr><td>one</td><td>two</td><td>three</td></tr><tr><td>four</td><td>five</td><td>six</td></tr><tr><td>seven</td><td>eight</td><td>nine</td></tr><tr><td>ten</td><td>eleven</td><td>twelve</td></tr></table>

Lets you clear the table heading and row data. If you need to show multiple tables with different data you should to call this method
after each table has been generated to clear the previous table information. Example: