<?php
use alesinicio\HTMLTable;
require "../HTMLTable.php";
$arrHeaders = array(
"First column", "Second column", "Third column", "Fourth column"
);
$arrData = array(
array("this", "is", "first", "row"),
array("could", "come", "from", "database")
);
$arrTDClasses = array("red", "blue", "green", "grey");
$table = new HTMLTable();
$table->setData($arrData);
$table->setHeaders($arrHeaders);
$table->setTdClasses($arrTDClasses);
echo $table->getHTML();
echo "<style>
.red{background-color: red;}
.green{background-color: green;}
.blue{background-color: blue;}
.grey{background-color: grey;}
</style>";
|