Hey guys
how do i customise this class so that the Creatpage() function or thepage that is send to the browser is processed as a php page instead of a html page because my html template has php include codes in the tables so it has to be processed as .php ?????





PHP Code:
<?php



class HtmlTemplate{

    var 
$template;
    var 
$html;
    var 
$parameters= array();

    function 
HtmlTemplate ($template) {    //sets which template to be used

                       
$this->template $template;
                       
$this->html implode("",(file($this->template)));   //read the template into an array and then creat
                                    
}

   

    function 
SetParameter ($variable,$value){  //sets tha particular values
                            
           
$this->parameters[$variable] = $value;
                          }


    function 
CreatePage (){   //does the bulk of the work
   

    
foreach ($this->parameters as $key => $value){    //loop thro all the parameters and set the variables to values.
      
$template_name='{'.$key.'}';

      
$this->html =str_replace($template_name,$value,$this->html);
                                               }
      echo 
$this->html;
      echo 
"sawa";
      
     
                        }
                   }




?>
heres the template.php


PHP Code:
<html>
<head>
<title> Page 1 </title>
<link rel="stylesheet" type="text/css" href="{CSS}"/>
</head>

<body>
<?php
include ("{TOPHTM}");
?>
<table width="90%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td><?php
include ("TOPMIDHTM}");
?></td>
  </tr>
</table>
<!-- Table for Main Body -->
<table width="81%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="111" align="right" valign="top">
<?php
include ("{MENU}");
?>
</td>
<td width="1" bgcolor="#336601" valign="top">  </td>
<td valign="top" bgcolor="#FFFFFF">

<?php
include ("{BODY}");
?>
<br>
<br></td>
</tr></table>

<table width="90%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td><?php
include ("{FOOTER}");
?></td>
  </tr>
</table>
</body></html>
thanks guys