Re[2]: [PHP] Need a little help with array
| From: | Richard Kurth | Date: | Wed, 16 May 2001 03:24:47 +0000 |
| Subject: | Re[2]: [PHP] Need a little help with array | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-52982@lists.php.net to get a copy of this message | ||
Hello Maxim,
This works great except that it does,t print the email if I take the
'<' '>' off then it does but I need those < >
Tuesday, May 15, 2001, 7:58:28 PM, you wrote:
Maxim Maletsky> Try this instead:
Maxim Maletsky> $sql = "
Maxim Maletsky> SELECT
Maxim Maletsky> CONCAT(fname, ' ', lname, '<', email,
'>') AS str_email
Maxim Maletsky> FROM
Maxim Maletsky> customers
Maxim Maletsky> ";
Maxim Maletsky> and then the rest of your code..
Maxim Maletsky> Sincerely,
Maxim Maletsky> Maxim Maletsky
Maxim Maletsky> Founder, Chief Developer
Maxim Maletsky> PHPBeginner.com (Where PHP Begins)
Maxim Maletsky> maxim@phpbeginner.com
Maxim Maletsky> www.phpbeginner.com
Maxim Maletsky> -----Original Message-----
Maxim Maletsky> From: Richard Kurth [mailto:rkurth@pacifier.com]
Maxim Maletsky> Sent: Wednesday, May 16, 2001 10:49 AM
Maxim Maletsky> To: php-general@lists.php.net
Maxim Maletsky> Subject: [PHP] Need a little help with array
Maxim Maletsky> I am trying to get the first name and Last name plus the email
Maxim Maletsky> address out of the database in a format like this
Maxim Maletsky> Richard Kurth<rkurth@pacifier.com>;Richard
Maxim Maletsky> Kurth<rkurth@northwesthost.com>
Maxim Maletsky> so I can put it in the BCC section of a mail all customer program
Maxim Maletsky> What I have below works for getting the email out but I can't
Maxim Maletsky> figure out how to get the rest out all together
Maxim Maletsky> $sql = "SELECT email,fname,lname FROM customers";
Maxim Maletsky> $result = mysql_query($sql);
Maxim Maletsky> $recipient = array();
Maxim Maletsky> while ($myrow = mysql_fetch_array($result))
Maxim Maletsky> $recipient[] = $myrow["email"];
Maxim Maletsky> $recipient_list = implode(",", $recipient);
Maxim Maletsky> Best regards,
Maxim Maletsky> Richard
Maxim Maletsky> mailto:rkurth@pacifier.com
--
Best regards,
Richard
mailto:rkurth@pacifier.com