Web made of place holders

Hello, I saw this once and I liked it so much. But I didn’t know anything about php(this hasn’t changed much).

A web created like this:


I want to make a php/html with placeholders, and insert menu in database. So when u click menu u get to a new page with the same format, styles, etc,. For every name in menu insert. So if change this menu i’ll only do it once and not in each page. Content to match this menu tittle and a static footer.

So i wan’t to do something similar. Not to complex, what is this called? I just don’t find it in my shearchs, I’m probably searching the wrong term. Do each separete web, will need a connection, diferent tables in same database for content, menu, footer or how?.
And how do to replace the {menu} with the menu in database

I just remember this web from the past and want to try doing one. Maybe in the future add a control panel so I can add/edit/delete the menu and content directly.

Sounds like you’re looking for a template engine?


1 Like

Hello, thanks for your answer. I’m not quite sure if its a template engine, I don’t think so. But will investigate more.
Thanks a lot for your answer.

If all you are interested in is replacing tags in a template with dynamic content, you can just use php’s str_replace. A template engine gives you the ability to do conditional statements, loops, … Also, by default, a template engine applies htmlentities to dynamic values in order to help prevent cross site scripting. You should do this yourself if you are just using php.

1 Like
Sponsor our Newsletter | Privacy Policy | Terms of Service