PHP Classes

File: sClassHTML/example/table/table.php

Recommend this page to a friend!
  Classes of Dario Mazzeo   sClassHTML   sClassHTML/example/table/table.php   Download  
File: sClassHTML/example/table/table.php
Role: Example script
Content type: text/plain
Description: Esempio di formattazione tabella
Class: sClassHTML
Compose HTML pages programmatically
Author: By
Last change: .
Date: 15 years ago
Size: 651 bytes
 

Contents

Class file image Download
<?php

require_once '../sClassHTML/sClassHTML.php';

$table = new sTable('ciao');
$titoli = array(html_label('campo1', '', '300px', 'lime'),
               
html_label('campo2', 'right', '300px', 'yellow', 'blue'),
               
html_label('campo3', 'left', '300px', '', 'red'));
$campi[] = array('valore1-1', 'valore\'<>1-2', 'valore1-3');
$campi[] = array('valore2-1', 'valore2-2', 'valore2-3');
$campi[] = array('valore3-1', 'valore3-2', 'valore3-3');
str_array($campi, str_html);

for (
$i=0; $i<count($campi); $i++)
   
$campi[$i][1]=html_label($campi[$i][1], 'right');


$table->addThead($titoli);
$table->addBody($campi, false);
echo
$table;


?>