Using Templates and replace tags to create dynamic content
| From: | Sharat Hegde | Date: | Fri, 06 Apr 2001 09:07:05 +0000 |
| Subject: | Using Templates and replace tags to create dynamic content | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-47421@lists.php.net to get a copy of this message | ||
Hello,
I am trying to create the subject text of an email message which needs to be
sent to a user. The text will have some tags which need to be replaced with
the appropriate values. Does anyone have some code / PHP class which they
can share which would do the following:
Template will be of the form:
**************************
Dear __NAME__,
Your current account number __ACCOUNT_NUMBER__ has a balance of __BALANCE__
as on __DATE__
Thanks,
Administrator
**************************
The code will be passed the template and a list of values which will replace
the above tags __NAME__, __ACCOUNT_NUMBER___, ...
If you need some clarifications, please contact me. Sending email is not a
problem at all. I know this is not hugely difficult, but I am looking at
some ready to use code, if possible. Thanks in advance.
Regards,
Sharat