I am trying to understand how to create a custom parser for shortcodes in PHP, but I need directions on which php function (or maybe even php library) to use.
For example, I have a string in this format:
Hello {user.name}, your CODE is {user.code}
I have in advance prepared email templates with custom 'shortcodes' (user_name, id, adress and so on). I'd like to dynamically check if string has shortcodes and replaced all shortcodes on real data from database.
str_replace()str_replace