Login   Register  
PHP Classes
elePHPant
Icontem

File: alternative.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Evgeny  >  tplTemplatez  >  alternative.php  >  Download  
File: alternative.php
Role: Example script
Content type: text/plain
Description: example
Class: tplTemplatez
Template class used to separate PHP and HTML
Author: By
Last change:
Date: 2003-04-05 04:36
Size: 623 bytes
 

Contents

Class file image Download
<?php
require ('../tplTemplatez.php');


// load template
$tpl = new tplTemplatez('alternative.tpl'); 

for(
$i=0;$i<6;$i++){
    
    if(
$i == || $i == 5) {
        
$tpl->tplSetNeeded('ROW/if_i_2');
    }
    
    
    if(
$i == || $i == || $i == 5) {
        
$tpl->tplSetNeeded('ROW/another_tr');
        
        if(
$i == 4)
            
$tpl->tplSetNeeded('ROW/two_td');
        else
            
$tpl->tplSetNeeded('ROW/one_td');
    }    
    
    
//$tpl->tplAssign('var', $i);     // assign variable
    
$array['var'] = $i;               // anoter way to assign variable
    
    
$tpl->tplParse($array,'ROW'); // parse main dinamic block
}

$tpl->tplPrint(); // print the result
?>