Let's say you have an array of countries and you need comma separated values of 'countries'.
Countries Array :
$countries = array("India","USA","UK");
To convert array elements into comma separated string, use this php inbuilt function called join on the array
$data = join(', ', $countries);
0 Comment(s)