I have a multiple select list in my site where the values are inserted in a database table, in a column named available_country. I enter these values in the db separated with comma. I don't know however how to remove the last comma so it will be something like this:
USA, Europe, Asia
and not:
USA, Europe, Asia,
Here's what I tried but it didn't worked:
$sql .= "'";
foreach($_POST['available'] as $available_in) {
$sql .= $available_in.", ";
}
$available_in = substr($available_in, 0, -1);
Thanks in advance.