Jump to content

separate by commas


jwk811

Recommended Posts

What is it with me and commas today??

 

you can substr or rtrim the prev code or as darkwater suggested:

$sql = "selece email from table";
$result = mysql_query($sql);
while($r = mysql_fetch_assoc($result)) {
   $emails[] = $r['email'];
}
$emaillist = implode(',',$emails);

Link to comment
https://forums.phpfreaks.com/topic/122626-separate-by-commas/#findComment-633214
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.