Galcon Games
Phil Hassey - game dev blog
Phil Hassey as Wolverine
"What kind of
arrogant jerk
has a website like this?"

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!


Galcon   Watermelons   Dynamite   The Hairy Chestival
All content of imitation pickles (c) 1999-2008 - Phil Hassey  "we care"