php - If statements in template system -


how can parse, let's say, {if $var > 2} or {if $var} in .tpl file in own version of templating class. not wanna use smarty don't need plugins. want include, if, , foreach statements.

please use php. put in tpl file:

<?php if ($var > 2) .... ?>  

it's lot simpler, less code , lot faster parsing file in php


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -