just wondering what's the best approach for template String replace.
preg_replace('/{%(\S+)%}/', 'bill', $tableOutput);
With the preg_replace, if there are lots of string needs to be replace, the function will be called many times depend on the number of string needs to be replace. Just wondering if there is a way can look though string once and replace accordingly?
Thanks