PHP Classes

File: example.php

Recommend this page to a friend!
  Classes of E_MAIL FALSO   TemplateBuilder   example.php   Download  
File: example.php
Role: Example script
Content type: text/plain
Description: Example file
Class: TemplateBuilder
Powerful and easy class to manage templates
Author: By
Last change: lala
Date: 22 years ago
Size: 876 bytes
 

Contents

Class file image Download
<?php

include("TemplateBuilder.php");

Class
Example
{
    var
$name = "Brazil";
    var
$example = array("Home", "Ball", "Phone");

    function
print_other_msg()
    {
        return
"Hi World! :)";
    }

}

function
print_msg($msg)
{
    echo(
$msg);
}

function
print_num($num)
{
   
$ret = "<table width=200 align=center cellspacing=2 cellpadding=2 border=0>";
   
    for(
$i = 0; $i < $num; $i++)
    {
       
$ret .= "<tr>";
   
$ret .= "<td bgcolor=#ff00ff>".$i."</td>";
   
$ret .= "<td bgcolor=#808080>".($i+1)."</td>";
   
$ret .= "</tr>";
    }
   
   
$ret .= "</table>";

return
$ret;
}

$title = "TemplateBuilder 2.5";
$author = array("hacker" => "Edson C. Melo", "fred" => "Frederico R. Galvão");
$msg = "The book is on the table";

$CL = new Example;

$TP = new TemplateBuilder;
$TP->parse_template("parent.html");

?>