PHP implodieren
$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);
$arr = array('Hello','World!','Beautiful','Day!');
echo join(",",$arr);
$colors = array("red","blue","green");
$colorsCSV= "'".implode("','",$colors)."'";
//$colorsCSV: 'red','blue','green'
<?php
$arr = array('cat','dog','elephent');
// it will convert array to string
$str = implode(', ',$arr);
echo $str;
?>