php make array comma separated string code example
Example 1: array to string separated by comma php
$arr = array ( 0 => "lorem", 1 => "ipsum", 2 => "dolor");
$str = implode (", ", $arr);
Example 2: foreach comma separated string php
$variable = 'value1, value2, value3, value4, value5';
$var=explode(',',$variable);
foreach($var as row)
{
//do your code here
}