I need help with a simple query, brain is dead today and cant work it out. Basically im querying the db for a list of usernames (which are email addresses) I then need to get all the found udernames into a variable, which i can then add to my email 'To' variable This doesnt work? $result3 = @mysql_query($sql3,$connection) or die(mysql_error()); while ($row = mysql_fetch_array($result3)) { $addresses= $row['username']; }; PHP: Any helpers?
$result3 = @mysql_query($sql3,$connection) or die(mysql_error()); $addresses = ''; while ($row = mysql_fetch_array($result3)) { $addresses .= $row['username'].';'; } PHP: That should work