How can I parse, let's say, {if $var > 2}
or {if $var}
in a .tpl file in my own version of a templating class. I do not wanna use smarty as I don't need all their plugins. I just want include, if, for and foreach
statements.
Please use php. Just put in your tpl file:
<?php if ($var > 2) .... ?>
It's a lot simpler, less code and a lot faster than parsing the file in php