Convert array to a string in PHP:
Use the PHP join
function like this:
$my_array = array(4,1,8);
print_r($my_array);
Array
(
[0] => 4
[1] => 1
[2] => 8
)
$result_string = join(',' , $my_array);
echo $result_string;
Which delimits the items in the array by comma into a string:
4,1,8