I am making a php/html template but cant get it to work...
this is part of my "pagetemplate.html" file:
<div id=titlebar>
<table width=100% height=100% valign=middle><tr><td valign=middle>
<div id=title valign=middle>
#page_title#
</div>
</td></tr></table>
</div>
this is my "tpltest1.php" file:
<?php
$title="welcome";
function buildArticle($title) {
$template = 'pagetemplate.html';
$template = preg_replace("#page_title#", $title, $template);
return $template;
}
buildArticle($title);
echo $template;
?>
Why wont this work?? 😕
thanx
svede
ps. the primary php code is based upon eoghain's code