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!