PHP Classes

File: index.php

Recommend this page to a friend!
  Classes of Muhammad Arfeen  >  TemplateEngine  >  index.php  >  Download  
File: index.php
Role: Example script
Content type: text/plain
Description: Example usage script
Class: TemplateEngine
Template engine that replaces marks with variables
Author: By
Last change:
Date: 13 years ago
Size: 746 bytes


Class file image Download

    example usage for TemplateEngine class.


include_once ""; // Class file inclusion

$TempleteEngine = new TemplateEngine("TENG"); // Constructor with place holder prefix as argument.

$HL = array();

/* Values are being replaced with place holders.
     Extra place holders in html file will be replaced, even if the values are not supplied.

$HL['[TENG_Title]'] = "Page title";
$HL['[TENG_Alert]'] = "Please provide value";
$HL['[TENG_FormAction]'] = "";

$HL['[TENG_ButtonLabel]'] = "Continue...";
$HL['[TENG_Example]'] = "TemplateEngine";

$TempleteEngine->LoadTemplate("php.html",$HL); // Loading and processing html template


For more information send a message to info at phpclasses dot org.