PHP implosionar
$array = array('banana', 'strawberry', 'apple');
comma_separated = implode(",", $array);
echo comma_separated; // banana,strawberry,apple
alexonxxx
$array = array('banana', 'strawberry', 'apple');
comma_separated = implode(",", $array);
echo comma_separated; // banana,strawberry,apple
$arr = array('Hello','World!','Beautiful','Day!');
echo implode(" ",$arr);
// Outputs: 'Hello World! Beautiful Day!'
$values = array_map('array_pop', $array);
$imploded = implode(',', $values);
$colors = array("red","blue","green");
$colorsCSV= "'".implode("','",$colors)."'";
//$colorsCSV: 'red','blue','green'
implode(",", $array)
// from PHP 8.0 (order parameters has been changed)
$arr = array('Hello','World!','Beautiful','Day!');
echo implode($arr, " ");