PHP Classes

File: usage.php

Recommend this page to a friend!
  Classes of Rupom Razzaque   Simple Template Parser Class   usage.php   Download  
File: usage.php
Role: Example script
Content type: text/plain
Description: Use of Simple Template Parser Class
Class: Simple Template Parser Class
Regular expression matching based template engine
Author: By
Last change:
Date: 17 years ago
Size: 974 bytes


Class file image Download
* Usage of Simple TemplateParser Class
* @author : MA Razzaque Rupom <>, <>
* Moderator, phpResource (
* URL:
* @version : 1.0
* Purpose : Parsing Simple Template File and Data that Contains Macros

require_once "TemplateParser.class.php";
$data = array();
$data['first_name'] = "MA";
$data['last_name'] = "Razzaque";
$data['nick_name'] = "Rupom";
$data['password'] = "supersecret";
$data['sender_name'] = "Administrator";
$data['site_name'] = "Name_Of_Site";

$obj = new TemplateParser();

//Parse Template File
$parsedData = $obj->parseTemplateFile("template.html");


//Parse Template Data
$parsedData = $obj->parseTemplateData(file_get_contents("template.html"));