PHP Classes

File: examples/structure.php

Recommend this page to a friend!
  Classes of Jin Nguyen   Puja   examples/structure.php   Download  
File: examples/structure.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: 547 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'=>'structure.tpl',
   
'php_file'=>highlight_file('structure.php',true),
);


$cat_list = array(
    array(
       
'name'=>'Cat 1',
       
'news'=>array(array('name'=>'1.1'),array('name'=>'1.2'))
    ),
    array(
       
'name'=>'Cat 2',
    )
);

$data = array(
       
'var'=>1,
       
'array'=>array(1,2,3),
       
'cat_list'=>$cat_list,
);
$tpl->parse('structure.tpl',$data);

?>