The method accepts an incoming array of references to replacement data keyed by place holder. A foreach statement cycles through the array.
With each iteration of the foreach, a check is made to see if the value is a filename. If it is then the file's contents is loaded as the replacement data; if it isn't then it's assumed the data was passed as straight text. This allows the method to be a bit more flexible for the end user.
Once it's determined what the replacement data is, the placeholders (along with it's delimiters) are swapped out with the corresponding information. While ereg_replace might be more appropriate, I chose to allow for case insensitivity again as a convenience factor.