This is the templating class I have been working on and had working practise with in a few recent project - it's no where near perfect but doing the job so far.
The templating is based on [ ] brackets - although I am looking to move them too something less generic like {% %}
Setting up tags to replace just set an array for example: $tags and call each key the tag you want to replace -> $tags['name'] = 'Ashley'
Standard Tags
[BANANA]
Conditional Tags
conditional statements are reliant on whether the variable is set to TRUE.
[IF SHOW_BANANA]
I am only shown if show_banana is true
[/ENDIF SHOW_BANANA]
Foreach Tags
Foreach loops are based on associative arrays within an array ( two dimensional ).
Example: array ( array ( 'name' => 'Ashley Banks' ), array ( 'name' => 'Banana man' ) )
[FOREACH banana as b]
My name is: [b.name]
[/banana FOREACH]