Again another nooby question I'm sure but I'm stuck so shall have to ask... :)As the title says really, I'm looking to grab email addresses from a database to make up a recipients list for this email script... I've managed to come up with something which will do the job but running this 500 times over doesn't seem a great solution to me... :)Is there a way I can add collect all of the 'email' results, add seperating commas between them and mail to them? or an even better way of doing it?Anything suggestions at all would be great!Thanks,-Andy.
<db connect code etc...>while($row = mysql_fetch_array($result)){$to = $row['email'];$subject = "Test Email";$message = "Test Email Message";$from = "someone@mydomain.com";$headers = "From: $from";mail($to,$subject,$message,$headers);}mysql_close($con);?>