I have created various template engines in the past. However, good or not as they were, I found them fatally inefficent. Their manner used functions and thus required massive globals and eval()’s to be called at every instance, and I just thought there had to be a better way.
I want to write a function that will take the template into a string, search for variables in form $variablename and globalize them in some manner. This however, seems to be beyond my ability to find a clean way of doing such.
I would also like to create another function (if not the same) that would take the template into a string, find <if condition=”> and parse it as a normal if parameter.
If anyone can help me with this, it would be a great help as it is necessary for me to strive for efficency.
Thanks again ? ?