I wonder if you could help me figure this out. I am retrieving values (specifically email) from database, and I want to store it in an array.
My problem is that I don't know how to store multiple values and retrieve them separately so that I can send those address with emails. I tried the code below but it didn't work.
$email = "select * from student";
if ($p_address = mysql_query($email)) {
while($row = mysql_fetch_assoc($p_address)) {
$address = mysql_result($row, 0);
}
}
The only thing that my code does is to send all of the emails to a single address, and that single address is the first entry in the database. Also note that the number of emails sent to tat particular address corresponds to the number of addresses in the database.
Thanks if you could help.