PHP: How to convert HTML template to string by executing logic inside HTML? -


is there way in can read html file in php script can provide me contents of file string output replacing variables , executing logic?

basically, looking php function can serve template engine. coming python, django looking similar render function in django.

try using str_replace function passing html template vars want replaced in template.

i suggest consider using template engine smarty or twig.


Comments

Popular posts from this blog

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -