I want to get all email addresses from MySQL database and fill that into a PHP variable. PHP variable should be used to send mail to all addresses.
The problem is that only one email is written in the variable...There should be 20 of them...
$q = "SELECT * FROM email_subscribe";
$r = mysqli_query($dbc, $q);
if($r) {
if(mysqli_num_rows($r) == 1) {
while($row = mysqli_fetch_assoc($r)) {
$recivers = $recivers . $row["email"] . ", ";
}
}
}
I tried to use the array but then I can't put a comma ( , ).