What is the best way of replacing a set of short tags in a PHP string, example:
$return = "Hello %name%, thank you for your interest in the %product_name%. %representative_name% will contact you shortly!";
Where I would define that %name% is a certain string, from an array or an object such as:
$object->name;
$object->product_name;
etc..
I know I could run str_replace multiple times on a string, but I was wondering if there is a better way of doing that.
Thanks.