0

For automatise the email sending in PHP, i store the content of the emails in a database.

Is it possible to store the name of the variable in the database for using after run in the result of the query ? and how to do this?

I've try this: $body = preg_replace('#\$[a-z0-9_]+#i', "$$0", $bodyFromDB);

For example, i want to store this:

Dear $firstname $lastname, ...

Thanks for your help

PS: I am open to an other solution.

Final Edit: I've found my hapiness here: https://stackoverflow.com/a/17274461/7754097

Community
  • 1
  • 1

0 Answers0