Login   Register  
PHP Classes
elePHPant
Icontem

File: example1.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Dmitry Levashov  >  YaTemplate  >  example1.php  >  Download  
File: example1.php
Role: ???
Content type: text/plain
Description: simple example
Class: YaTemplate
Yet another template class
Author: By
Last change:
Date: 2001-10-04 17:37
Size: 422 bytes
 

Contents

Class file image Download
<?php
include "YaTemplate_class.php";

$T = new YaTemplate();

$T->SetFile(array(main=>"main.html", tb=>"table.html"));

$T->SetVar(array(title=>"Example 1", tb_header=>"One simple example :) "));

$T->SetBlock("tb", "row");

for ($i=1; $i<10; $i++)
{
    $T->SetVar("text", "Row $i");
    $T->Parse("row", "row", true);
}


$T->Parse("CONTENT", "tb");
$T->Parse("out", "main");

$T->PrintOut();

?>