- implode: documentation ( source)
<?php
$array1 = array("here","we","go");
$array1[2] = 'go';
$array1[1] = 'we';
$array1[0] = 'here';
$array2 = array('here');
$array2[2] = 'go';
$array2[1] = 'we';
$array2[0] = 'here';
$str1 = implode(',',$array1);
$str2 = implode(',',$array2);
echo $str1;
echo $str2;