6
I am creating a message profile system, when the system performs a certain action it picks up a certain profile and triggers the message as e-mail, however I would like in the body of the message, when written {{variavel}}
I’d like him to take the value of $variavel
corresponding (automatically), however I do not know what this method is called and I have not found any solution yet, will someone be able to give a little help?
Explanation:
I have the following message:
{{name}} Lorem Ipsum is Simply dummy text of the Printing and typesetting Industry {{email}}
To replace these values I would have to do as follows:
str_replace("{{nome}}", $nome, $mensagem);
str_replace("{{email}}", $email, $mensagem);
Only I wanted to do it in a way that was automatic.
For example: in the body of the message will contain this
{{nome}} {{email}}
I want this to be replaced by the variable that will be internally in PHP$nome $email
with their respective values.– Italo Izaac