Phil Hassey - game dev blog
Phil Hassey as Rambo
".. I've been there,
I know what it's like,
and I'll do it again if I have to."

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!