Printing the output of a loop in an e-mail

From: Date: Wed, 03 Jan 2001 22:46:17 +0000
Subject: Printing the output of a loop in an e-mail
Groups: php.general 
Request: Send a blank email to php-general+get-32556@lists.php.net to get a copy of this message
Hey, I have a script that allows a user to send e-mails to multiple people using one script. I want to output the contents of a loop that is used to pass the e-mail addresses to the script in the confirmation e-mail that is sent to the user. My question is, how do i do this? I can't just stick the code in the mail() function because it just prints the code in the e-mail and sends it. My loop looks like this: if (is_array($recipients)) { foreach ($recipients as $to) { echo "$to\n\n"; } } and it works just fine. How do it print this loops output into the e-mail?? Thanks, Jeremy

« previous php.general (#32556) next »