1)A query to select all the users who have recievemail = YES
2)Fetch all the email from the query to an array and put commas to one after another
3)The echo would be something like this
[email]google@gmail.com,microsoft@hotmail.com,newguy@new.com[/email],and so on
Code: Select all
$query = "SELECT * FROM " .s('prefix'). "users WHERE recievemail = 'YES' ORDER BY id DESC";
$result = mysql_query($query);
$n[] = mysql_fetch_array($result);
foreach ($n as $e)
{
$mails = $e['email'];
$multiplemails .= $mails . ",";
echo $multiplemails;
} Code: Select all
messinanahuel@hotmail.com,Any ideas? Thanks for the time anyway.
Chenci