ain’t broken don’t fix it
One line PHP templating engine:
echo str_replace(array_keys($replace), array_values($replace),$content);
Phil Hassey - game dev blog | ![]() |
![]() |
".. I've been there,
I know what it's like, and I'll do it again if I have to." |
One line PHP templating engine:
echo str_replace(array_keys($replace), array_values($replace),$content);
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!