RE: [PHP] Printing the output of a loop in an e-mail

From: Date: Wed, 03 Jan 2001 23:20:45 +0000
Subject: RE: [PHP] Printing the output of a loop in an e-mail
Groups: php.general 
Request: Send a blank email to php-general+get-32560@lists.php.net to get a copy of this message
Try somthing like this: $sendto = array("bob", "joe", "tom"); $list = ""; foreach ($sendto as $to){ $list .= "$to\n"; } -----Original Message----- From: Jeremy Bowen [mailto:ocarules@webnationinc.com] Sent: Wednesday, January 03, 2001 3:46 PM To: php-general@lists.php.net Subject: [PHP] Printing the output of a loop in an e-mail 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 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#32560) next »