Thanks, I should have drop a code snippet in there... My problem was the .=

-----Original Message-----
From: Chris Lee [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 07, 2001 11:39 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] email with multiple records


suppy a code snippit and I would have a huge advantage here, but I'll swing
in the dark on this ok.

your looping all this in a for/while/foreach loop right. your generating the
body like this ?

foreach($people as $pos => $val)
{
    $email_body .= 'name is '. $people[$pos]['name'] ."\n";
    $email_body .= 'email is '. $people[$pos]['email'] ."\n";
    $email_body .= 'phone is '. $people[$pos]['phone'] ."\n";

    mail($email_to, $email_body, $email_from);
}

right ? change it to this.

foreach($people as $pos => $val)
{
    $email_body  = '';
    $email_body .= 'name is '. $people[$pos]['name'] ."\n";
    $email_body .= 'email is '. $people[$pos]['email'] ."\n";
    $email_body .= 'phone is '. $people[$pos]['phone'] ."\n";

    mail($email_to, $email_body, $email_from);
}

now good change im out to lunch here, but sithout a code snippit im grabing
here. please post regarding, thank you.


--

 Chris Lee
 Mediawaveonline.com

 ph. 250.377.1095
 ph. 250.376.2690
 fx. 250.554.1120

 [EMAIL PROTECTED]



""WreckRman2"" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...

I wrote a small script like a email list only when I run it with 3 emails.
The first record gets his info, 2nd get his plus first, 3rd get his plus 2nd
and 1st. Why is it doing this?

David Smith

Number 3 record gets email with:
---------------------

Hi [EMAIL PROTECTED],

Your email is [EMAIL PROTECTED]

 Bye, WreckRman2

---

Hi [EMAIL PROTECTED],

Your email is [EMAIL PROTECTED]

 Bye, WreckRman2

----

Hi [EMAIL PROTECTED],

Your email is [EMAIL PROTECTED]

 Bye, WreckRman2


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to