PHP Classes

File: examples/variable.php

Recommend this page to a friend!
  Classes of Jin Nguyen   Puja   examples/variable.php   Download  
File: examples/variable.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Puja
Template engine that compiles templates into PHP
Author: By
Last change:
Date: 10 years ago
Size: 440 bytes
 

Contents

Class file image Download
<?php
ini_set
('display_errors','On');
include
'../puja.php';
$tpl = new Puja;
$tpl->template_dir = 'templates/';
$tpl->cache_dir = 'cache/';
$tpl->parse_executer = 'eval';
$tpl->headers = array(
   
'tpl_file'=>'variable.tpl',
   
'php_file'=>highlight_file('variable.php',true),
);
$user = array(
   
'name'=>'Puja',
   
'age'=>20,
);
$data = array(
   
'username'=>'Puja',
   
'special_var'=>'age',
   
'user'=>$user,
);
$tpl->parse('variable.tpl',$data);
?>