For an array like the one below; what would be the best way to get the array values and store them as a comma-separated string?
Array ( [0] => 33160,
PHP has a built-in function implode to assign array values to string. Use it like this:
$str = implode(",", $array);
implode(' ',$array);