Curly Swap - PHP function

This php function allows you to pass in a string with {{words}} inside double curly braces, it then strips them out and replaces them with entries in an array with matching keys.

Download the code here