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 an example of easy-to-code select input</h2>
<?include('templatelib.php');?>
<? ob_start
();//content for selectSelector()?>
<select name="entries">
    <option value="1">first</option>
    <option value="2">second</option>
    <option value="3">third</option>
</select>
<?=selectSelector(ob_get_clean(), $_REQUEST['option'], '3')?>
<?
/*now you can try visit block.php - default 'third' option should be selected, or
block.php?option=1, option=2, ... This should select proper option*/
?>
<div>
Third is the <a href="?page=block">default</a>. You may also select: <a href="?option=1&page=block">first</a> <a href="?option=2&page=block">second</a> <a href="?option=3&page=block">third</a>
</div>

Here is an example of easy-to-code select input

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