Galcon Games
Phil Hassey - game dev blog
Phil Hassey as Snidely Whiplash
"You can't buy awesomeness.
You're born that way."

ain’t broken don’t fix it

One line PHP templating engine:

echo str_replace(array_keys($replace),
array_values($replace),$content);

2 Responses to “ain’t broken don’t fix it”

  1. Josh Says:

    Maybe. But that is so much typing!

    echo strtr($content,$replace);

  2. philhassey Says:

    Man – now that’s the ticket! I’ll have to update my templating engine!