welcome to ...

pure-PHP templating

Hi. Here is a set of simple php scripts introdusing the idea -

" php - is a great template engine itself "

Better start looking into their source and try to guess what you'll see visiting them in your browser.

home master.php control.php top.php foot.php derived.php block.php helper.php templatelib.php multipass.php
<h2>Here is a nice select helper. Looks almost like pure-html &lt;select&gt;, isn't it?</h2>
<?include('templatelib.php')?>

<?select('entries'$_REQUEST['option'], 3)?>
    <?option('first'1)?>
    <?option('second'2)?>
    <?option('third'3)?>
</select>

<?/*now you can try visit helper.php - default 'third' option should be selected, or
helper.php?option=1, option=2, ... This should select proper option*/
?>
<div>
Third is the <a href="?page=helper">default</a>. You may also select: <a href="?option=1&page=helper">first</a> <a href="?option=2&page=helper">second</a> <a href="?option=3&page=helper">third</a>
</div>

Here is a nice select helper. Looks almost like pure-html <select>, isn't it?

Third is the default. You may also select: first second third