PHP templating engine from scratch
In a previous post I have introduced PHP templating in 165 lines of code with no dependencies. I have added several features since it’s initial release and the line count has roughly doubled. This post gives you an overview of the added functionality and explains how to use it. An ‘if’ now supports ’else’ and ’elseif’ Conditionals are an essential construct in a template. When you implement them without ’else’ or ’elseif’ you get either a lot of repeated conditions and unnecessary nesting. ...