* @author Tomas Mudrunka
*/
class HTML {
- function row($row) {
- $html='<tr>';
+ function row($row,$type=false) {
+ $html = '';
+ if($type) $html.="<$type>";
+ $html.='<tr>';
+ $td = $type == 'thead' ? 'th' : 'td';
foreach($row as $var) {
if(trim($var) == '') $var = ' ';
- $html.="<td>$var</td>";
+ $html.="<$td>$var</$td>";
}
$html.='</tr>';
+ if($type) $html.="</$type>";
return $html;
}
$header=true;
foreach($table as $row) {
if($header) {
- $html.=$this->row(array_keys($row));
+ $html.=$this->row(array_keys($row),'thead');
$header=false;
}
$html.=$this->row($row);
<style type="text/css">
* { font-family: arial; }
+td,body { background-color: white; }
+table { background-color: orange; border: orange; }
+a { text-decoration:none; color: darkblue; }
+li a, a:hover { text-decoration:underline; }
.menu li {
float: left;