Would this work? I know you can concatenate variables this way.
while ($row = mysql_fetch_array($result)) {
$recipients[] = $row['phone'] . $row['carrier'];
}
while ($row = mysql_fetch_array($result)) {
$recipients[] .= $row['email'];
}
It won’t work since you have already reached the end of the fetch (i.e.
mysql_fetch_arraywill always return false in the second loop).Moreover, it probably wouldn’t be a good idea if you wanted have some indicator of phone vs. email, but I guess you don’t:
Also, didn’t anyone tell you to use
PDOormysqli?