I am trying to create a php string with integers separated by commas. The values for the string are coming from a do { }while loop. How would I do this?
//GRAB EC DATA
$mysql_ec_data = "SELECT `ec_c_id` FROM `e_c` WHERE `ec_id` = '$e_id'";
$query_ec_data = mysql_query($mysql_ec_data) or die(mysql_error());
$ec_data = mysql_fetch_assoc($query_ec_data);
$string = "";
do {
//There will be values looping through here that I want to add to a single string.
$string =+ $ec_data['ec_id'];
} while ($ec_data = mysql_fetch_assoc($query_ec_data));
//this is how the values from the while loop should look in the string at the end
$string = 45,52,23;
$string .= $ec_data['ec_id'] . ",";?? this?