PHP Templating in Just PHP

added by JavaScript Kicks
12/27/2019 9:47:53 AM

223 Views

With stuff like template literals in JavaScript and templating languages, like JSX, I've gotten used to wanting to write my HTML templates in one nice chunk and sprinkling in variables wherever I need them. I had a situation where I needed to do that in "raw" PHP the other day, so I'm just documenting it here.


0 comments