note 99064 deleted from function.eval by danbrown
| From: | danbrown@php.net | Date: | Mon, 26 Jul 2010 14:36:33 +0000 |
| Subject: | note 99064 deleted from function.eval by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-171136@lists.php.net to get a copy of this message | ||
Note Submitter: it at rustenburger dot co dot za
----
When creating emails with variables I use the following code
//html email create
ob_start();
include 'mail.html';
$html=ob_get_clean();
//text email create
ob_start();
include 'mail.txt';
$text=ob_get_clean();
The template files contain the content with the variables in the form:
<?php echo " ".$name;?>
Easy!