I have script that grabs a list of email adresses from a mysql database with the following code and then have all those people are emailed.
$message = "New Exhibit Event\n$event_title\nEvent Hosted By: $sponser_name";
$extra = "From: $email\r\n";
$result = mysql_query("SELECT email from representatives email",$db);
while ($myrow = mysql_fetch_array($result))
{
mail ($myrow["email"], "New WOATRA Exhibit Event", $message, $extra);
}
When this script is executed some people recieve more than one email because they have multiple entries that cannot be removed. Is there a way to remove all the duplicate email addresses that are stored in the mysql_fetch_array before executing the mail command?
Thanks for the help,
Matt