PHP Classes
elePHPant
Icontem

File: example.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Alexey Burkov  >  Dextep Template Engine  >  example.php  >  Download  
File: example.php
Role: Example script
Content type: text/plain
Description: Example
Class: Dextep Template Engine
Template engine based on regular expressions
Author: By
Last change:
Date: 4 years ago
Size: 565 bytes
 

Contents

Class file image Download
<?
header
('content-type: text/html; charset=utf-8');

require_once
'Dextep.class.php';
$template = new Dextep();

if (isset(
$_POST['name'])) $template->setVar('name', $_POST['name']);
if (isset(
$_POST['sex'])) $template->setVar('sex', $_POST['sex']);

$template->setVar('list', array(
   
'Drinks' => array('Milk', 'Coffee', 'Tea'),
   
'Cars' => array('Honda', 'Ford', 'Renault')
));

$template->setVar('calendar', array(
   
'nDays' => date('t'),
   
'start' => date('w', strtotime(date('Y-m-01')))
));

echo
$template->getTemplate('example', true);
?>