So I caved in, and decided to use str_replace to replace all entities in the function. Here is the block of code:
$outdata = $structure[($name.'START')];
foreach($attribs as $key=>$value)
{
$outdata = str_replace('{'.$key.'}',$value,$outdata);
}
echo $outdata;
It takes the template data to be reformatted, then checking all of the attributes passed to the function, searches the template string for the appropriate tag to replace and replaces it. Then, it outputs the reformatted code.
Normally, I shy away from loops and repeating constructs simply because there is often a much simpler way. In this case the foreach loop was the most simple.
Thanks guys for your help, and if anyone does come up with a good one liner, I might just use it.
Thanks!!
Josh