PHP Classes

File: example3.1.php

Recommend this page to a friend!
  Classes of Daniel Chaves   IS Layout   example3.1.php   Download  
File: example3.1.php
Role: Example script
Content type: text/plain
Description: Example 3.1
Class: IS Layout
Template engine that replaces place holder values
Author: By
Last change:
Date: 20 years ago
Size: 454 bytes
 

Contents

Class file image Download
<?php
require_once "../islayout.php";

$html=<<<END
<html>
<body>

<p align="center">&nbsp;</p>
<p align="center"><b>Today</b>: [date,month]/[date,day]/[date,year]</p>

</body>
</html>
END;

$date['month']=date("m");
$date['day']=date("d");
$date['year']=date("Y");

$lay=new IS_Layout($html);

// First Argument in replace function are ever the reference of variable in HTMl file
$lay->replace('date',$date);

$lay->display();
?>