Hi I'm writing something for handling my views an I need a preg_replace here, but i can't seem to get it working so I've scrapped the code.
the strings I am trying to replace are dynamic based on a template, e.g.
{{name}} is {{age}} years old
And the passed information into the function is an array e.g.
array(
'name' => 'John Doe',
'age' => '27'
);
The pattern I have so far is \{{([a-zA-Z0-9]+)\}}
however this only seems to match one pair of braces.
I'm also having a problem looping through results in preg_match_all..
Thanks in advance