MVC Micro Framework
Template Engine
A simple template engine that allows front end developers to use data elements and logical values from an application in ordinary files.
{title1}
{subtitle1}
{content1}
php code:
 1$this->setView();
 2
 3$this->view->assignValue("title1", $segment->title);
 4$this->view->assignValue("subtitle1", $segment->subtitle);
 5$this->view->assignValue("content1", $segment->content);
 6
 7$this->view->render("MVC/MVC.html");
html code:
 1<body>
 2<div class="content">
3<h1>{title1}</h1>
4<h2>{subtitle1}1</h2>
5<p>
6{content1}
7<p>
8<div>
9</body>
{title2}
{subtitle2}
{content2}