One line PHP templating engine:
echo str_replace(array_keys($replace), array_values($replace),$content);
This entry was posted on Wednesday, October 31st, 2007 at 1:28 pm and is filed under PHP, development. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.
Maybe. But that is so much typing!
echo strtr($content,$replace);
Man - now that’s the ticket! I’ll have to update my templating engine!
Name
Mail (will not be published)
Website
February 7th, 2008 at 10:57 am
Maybe. But that is so much typing!
echo strtr($content,$replace);
February 7th, 2008 at 11:30 am
Man - now that’s the ticket! I’ll have to update my templating engine!