Login   Register  
PHP Classes
elePHPant
Icontem

File: sClassHTML/example/table/index.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Dario Mazzeo  >  sClassHTML  >  sClassHTML/example/table/index.php  >  Download  
File: sClassHTML/example/table/index.php
Role: Example script
Content type: text/plain
Description: Esempio per l'utilizzo delle tabelle
Class: sClassHTML
Compose HTML pages programmatically
Author: By
Last change: aggiornato
Date: 6 years ago
Size: 760 bytes
 

Contents

Class file image Download
<?php
// esempio creazione tabella

// inclusione file
include (realpath(dirname(__FILE__).'../../../../sClassHTML/sClassHTML.php'));

// creazione pagina
$mypage = new sHtml("Pagina di prova");
$mypage->addCss("../../css/form.css");
$mypage->addCss("../../css/div.css");
$mypage->addCss("../../css/table.css");
$mypage->addCss("../../css/html.css");

// creazione della tabella
$titoli=array("Cognome""Nome""Indirizzo");
$campi[0]=array("Dario""Bianchi""Roma");
$campi[1]=array("Sergio""Rossi""Milano");
$campi[2]=array("Antonella""Viola""Roma");

$mytable=new sTable("Esempio");
$mytable->addThead($titoli);
$mytable->addBody($campi);

// aggiunge la tabella alla pagina
$mypage->addObj($mytable);

echo 
$mypage;
?>