PHP Classes

File: example1.php

Recommend this page to a friend!
  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: 20 years ago
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();

?>
For more information send a message to info at phpclasses dot org.