Try this instead:
$sql = "
SELECT
CONCAT(fname, ' ', lname, '<', email, '>') AS str_email
FROM
customers
";
and then the rest of your code..
Sincerely,
Maxim Maletsky
Founder, Chief Developer
PHPBeginner.com (Where PHP Begins)
[EMAIL PROTECTED]
www.phpbeginner.com
-----Original Message-----
From: Richard Kurth [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 16, 2001 10:49 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Need a little help with array
I am trying to get the first name and Last name plus the email
address out of the database in a format like this
Richard Kurth<[EMAIL PROTECTED]>;Richard
Kurth<[EMAIL PROTECTED]>
so I can put it in the BCC section of a mail all customer program
What I have below works for getting the email out but I can't
figure out how to get the rest out all together
$sql = "SELECT email,fname,lname FROM customers";
$result = mysql_query($sql);
$recipient = array();
while ($myrow = mysql_fetch_array($result))
$recipient[] = $myrow["email"];
$recipient_list = implode(",", $recipient);
Best regards,
Richard
mailto:[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]
--
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]