CTable 1.0

To use CTable, simply create an instance of it, like so:
$table = new CTable();

You will then need to assign the number of rows for the class, this is done using the Rows() method, like so:

You will also need to define the number of cells for the table, in much the same way you define the Rows, using the Cells() method, like this:

You can now set the data contained within the cells, like this:
for($x=1;$x<=$table->GetRows(); $x ) {
for($y=1;$y<=$table->GetCells(); $y ) {
$table->SetData("x($x) y($y)", $x, $y);

The above is a loop that fills each cell in the table with the row and cell number ... the output should look similiar to this:
x(1) y(1) | x(1) y(2) | x(1) y(3)
x(2) y(1) | x(2) y(2) | x(2) y(3)
x(3) y(1) | x(3) y(2) | x(3) y(3)

After you have placed data within the table, you must then Generate() it for it to be displayed on the screen. This is done with the Generate() method, like so:
You may additionally free up some memory, by calling the Release() method, like so:

You may wish to alter the table's class, border, width, cellpadding, cellspacing, or possibly its style attribute. You can do this using either the setHeader() method, or by calling the setClass, setBorder, setWidth, setCellpadding or setCellspacing methods, similiar to this:

$table = new CTable();
// setHeader must be called before any other Header methods
// setHeader rewrites the current Header, this is why!
$table->setHeader('style="border: thin solid red"');
$table->SetData("TEST", 1, 2);

License type: Freeware
Date added: 7 years, 6 months 9 days ago | Last updated: 7 years, 6 months 9 days ago

More popular HTML

This is actually one of the most advanced image hosting script. The imagetize key features: SEO, Ads Ready, Admin

Listing Files

Hot Scripts