Getting email out of a database

From: Date: Sat, 19 May 2001 18:04:54 +0000
Subject: Getting email out of a database
Groups: php.general 
Request: Send a blank email to php-general+get-53537@lists.php.net to get a copy of this message
I am trying to pull all the e-mail address out of a database to be able to do a mass send. This gets me all the e-mail address and puts a , between them which is what I want. $sql = "SELECT CONCAT(email) AS str_email FROM customers"; $result = mysql_query($sql); $recip = array(); while ($myrow = mysql_fetch_array($result)) $recip[] = $myrow["str_email"]; $recipient_list = implode(", ",$recip); I t gives me this list which is what I wanted test1@domain.com,test2@domain.com,test3@domain.com,test4@domain.com But now I would like to get the first address in the list into a variable and the rest in the list to a second variable Like this $v1= test1@domain.com $v2= test2@domain.com,test3@domain.com,test4@domain.com How would I go about this Best regards, Richard mailto:rkurth@pacifier.com

« previous php.general (#53537) next »