I need help to store many emails into one varible. My code is like this.
//start
$mejl = mysql_query("SELECT email FROM database ORDER by name",$db);
if ($myrow = mysql_fetch_array($mejl) ) {
do {
$mejlan += $myrow["email"];
}while ($myrow = mysql_fetch_array($mejl));
}
echo "<a href=\"mailto: $mejlan\">email!</a>\n";
//end
The part that doesn't work is $mejlan += $myrow["email"];
the emails are stored correctly in $mejl but they are not added together. $mejlan = $myrow["email"] + $mejlan; doesn't work either, both returns null.
Any suggestions?