After playling around with Facebook's developer platform I noticed they do Templatized Actions. This seems very interesting to me and I was wondering how it could be reproduced in php (without json).
for example:
Template:
{actor} just wrote about {friend} and his new {item}
Data:
array('actor' => 'sam', 'friend' => 'john', 'item' => 'book');
The final output:
sam just wrote about john and his new book
That's the idea, but how could you take those two items (template and data) and construct them into the final output? I know how to do it manually but I was hoping php could handle that dynamically incase of multiple templates.
Any ideas?