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 | ![]() |
![]() |
"You can't buy awesomeness.
You're born that way." |
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!