How do I put a loop within a message in an email?
Posted on 2014-08-02
Normally, when I send an email out, I've got a one row's worth of info and it's a no brainer. But this morning, I've got a situation where I may have to document several rows of info and I'm stuck.
Here's what I've got thus far:
$to = $email;
$subject = "Your Tae Kwon Do Password";
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$headers = "From: email@example.com\r\n" ."X-Mailer: php";
$message = "Hello!\n\nYour TKD password info is:\n\n";
I get to my $message and I'm thinking how do I embed in my $message several rows worth of info?