PHP For Loop help please?

Jared Q

New member
for ($i=0;$i<$num;$i++)
{
$email = mysql_result($sql,$i,"email");
echo "$email, ";
}

That works perfect, it prints out a list of all emails. But i want to take this list of emails and insert them into the mail() function to send a mass message to all emails. I cant figure out how to get the emails from the for loop into like a variable that i can insert into the mail() function. Thanks in advance!
 
Back
Top