Login   Register  
PHP Classes
elePHPant
Icontem

File: example.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Jake M  >  phpTable  >  example.php  >  Download  
File: example.php
Role: ???
Content type: text/plain
Description: A simple example
Class: phpTable
Author: By
Last change:
Date: 2002-02-15 22:56
Size: 1,399 bytes
 

Contents

Class file image Download
<? include ("class.phpTable.php"); ?>


   <? $myTable = new phpTable(); ?>
   <? $myTable->setProperty("tableID", "myTable");
      $myTable->setProperty("width", "400");
      $myTable->setProperty("border", "1");
      $myTable->setProperty("borderColor", "");
      $myTable->setProperty("cellPadding", "2");
      $myTable->setProperty("cellSpacing", "2");
      $myTable->setProperty("align", "left");
      $myTable->setProperty("styleClass", "tableClass");

      /* Only set the values you *need*
         The class will adjust itself for null values. */

   ?>




   <? $myTable->beginTable(); ?>

      <? $myTable->beginRow(); ?>



         <? $myTable->beginCell("firstCell", "#eeeeee", "", "200", "75", "center", "middle", "", "", ""); ?>

            This is my first cell.

         <? $myTable->endCell(); ?>



         <? $myTable->beginCell("secondCell", "#dddddd", "", "200", "75", "center", "middle", "", "", ""); ?>

            This is my second cell.

         <? $myTable->endCell(); ?>



      <? $myTable->endRow(); ?>
      <? $myTable->beginRow(); ?>



         <? $myTable->beginCell("thirdCell", "#cccccc", "", "400", "125", "center", "middle", "2", "", ""); ?>

            This is my third cell.

         <? $myTable->endCell(); ?>


      <? $myTable->endRow(); ?>


   <? $myTable->endTable(); ?>