RSSAmplifier

Ryan Chandler · Jun 14, 2023

Rendering & Echo (Build your own template engine in PHP)

0
Sign in to vote or save

This site does not allow itself to be embedded. You can still read it on the original site — the toolbar below keeps your place in the directory.

Let's build a tiny template engine for PHP! This post will focus on rendering the template and echoing out data that can be escaped with htmlspecialchars() . Before we start writing code we need to take care of the most important part of any programming project — giving the project a name. I'm going to call it Stencil. The templates themselves will all be plain PHP. We won't be creating any…

Read on ryangjchandler.co.uk

Comments

Nothing yet. Say the first thing.

    Sign in to join the conversation.