[PHP] [NEWBIE] Trying to combine array into one string

2005-02-15 Thread Dave
PHP General, The Situation: I'm retrieving some email addresses from a database. I want to be able assemble all the addresses into one string that I can use in the mail() command. At no time should there ever be more than about 5 email addresses collected from the database. I want all

RE: [PHP] [NEWBIE] Trying to combine array into one string

2005-02-15 Thread Warren Vail
[mailto:[EMAIL PROTECTED] Sent: Tuesday, February 15, 2005 7:37 AM To: php-general Subject: [PHP] [NEWBIE] Trying to combine array into one string PHP General, The Situation: I'm retrieving some email addresses from a database. I want to be able assemble all the addresses

Re: [PHP] [NEWBIE] Trying to combine array into one string

2005-02-15 Thread Matt M.
The Problem: I can't quite figure out how to take the results of the mysql_query() and assemble them into a string. In my experiments so far, I either get a mysql_data_seek(): Offset 0 is invalid for MySQL result index error, or my mail function sends to a blank address. no guarantee

Re: [PHP] [NEWBIE] Trying to combine array into one string

2005-02-15 Thread Gareth Williams
Use implode: http://nl2.php.net/manual/en/function.implode.php On 15 Feb 2005, at 16:37, Dave wrote: PHP General, The Situation: I'm retrieving some email addresses from a database. I want to be able assemble all the addresses into one string that I can use in the mail() command. At no

RE: [PHP] [NEWBIE] Trying to combine array into one string

2005-02-15 Thread Chris W. Parker
Dave mailto:[EMAIL PROTECTED] on Tuesday, February 15, 2005 7:37 AM said: The Problem: I can't quite figure out how to take the results of the mysql_query() and assemble them into a string. In my experiments so far, I either get a mysql_data_seek(): Offset 0 is invalid for MySQL

Re: [PHP] [NEWBIE] Trying to combine array into one string

2005-02-15 Thread Leif Gregory
Hello Dave, Tuesday, February 15, 2005, 8:37:02 AM, you wrote: D while ($tantoData = mysql_fetch_array($tantoResult)) D { D $tantoEmail = $tantoEmail . , . $tantoData; D } D mail($tantoEmail, $subject, $mailcontent, $addHeaders); Everything looked good up to here.

Re: [PHP] [NEWBIE] Trying to combine array into one string

2005-02-15 Thread Jochem Maas
Dave wrote: PHP General, The Situation: I'm retrieving some email addresses from a database. I want to be able assemble all the addresses into one string that I can use in the mail() command. At no time should there ever be more than about 5 email addresses collected from the database. I

Re: [PHP] [NEWBIE] Trying to combine array into one string

2005-02-15 Thread Richard Lynch
Dave wrote: The Situation: I'm retrieving some email addresses from a database. I want to be able assemble all the addresses into one string that I can use in the mail() command. At no time should there ever be more than about 5 email addresses collected from the database. I want all

Re: [PHP] [NEWBIE] Trying to combine array into one string [SOLVED]

2005-02-15 Thread Dave
Matt, Warren, Gareth, Chris, Jochem, Ospinto, Richard, Thank you all for your helpful suggestions. implode() is the command I needed, and I've applied syntax similar to Matt's suggestion. My problem is now solved. Your responses are all much appreciated. -- Dave Gutteridge [EMAIL