Re: Printing the output of a loop in an e-mail
| From: | Ignacio Vazquez-Abrams | Date: | Wed, 03 Jan 2001 23:11:27 +0000 |
| Subject: | Re: Printing the output of a loop in an e-mail | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-32557@lists.php.net to get a copy of this message | ||
On Wed, 3 Jan 2001, Jeremy Bowen wrote:
> 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
>
$tolist="";
foreach (...)
$tolist.="$to\n";
--
Ignacio Vazquez-Abrams <ignacio@openservices.net>