How do I create merge tags in a PHP/MySQL app?

Viewed 804

I'm writing a PHP/MYSQL SaaS app and I'm currently working on email functionality (using Swift). I plan to save email templates to the MySQL database (each tenant will be able to customize them). However, I also need to include dynamic data in the templates ("merge tags" like first name and last name). I tried simply storing {$test} in the DB but that didn't work. Is there something I need to do after pulling the data from MySQL to merge variables into the text before passing it to Swift?

1 Answers
Related