PHP Classes

File: example.php

Recommend this page to a friend!
  Classes of Gianluca Zanferrari   abc template   example.php   Download  
File: example.php
Role: Example script
Content type: text/plain
Description: example
Class: abc template
Template engine that replaces tags in PHP scripts
Author: By
Last change:
Date: 13 years ago
Size: 467 bytes


Class file image Download
* this is an example with simple data pairs; each key of the array represents the tag to be replaced and the value is the data.

* template processor
$page = new Page("page.html");

* here we go; replace all placeholders
'first' => 'This is my first sentence'
,'rand' => 'And this is my random #: ' . rand(100,999)