php implode
snippet in php

php array to string

user1684


<?php

$arr = array('Hello','World!','Beautiful','Day!');

echo implode(" ",$arr);

?> 

php implode array

user7340

$values = array_map('array_pop', $array);
$imploded = implode(',', $values);

implode in php

user775

<?php
$arr = array('Hello','World!','Beautiful','Day!');
echo implode(" ",$arr);
?> 

php implode

user8903

$arr = array('Hello','World!','Beautiful','Day!');
echo implode(" ",$arr);
// Outputs: 'Hello World! Beautiful Day!'

php implode

user9424

$colors = array("red","blue","green");
$colorsCSV= "'".implode("','",$colors)."'";
//$colorsCSV: 'red','blue','green'

php implode

user1525

$arr = ['Thor','Captain America','Iron Man'];
echo implode(', ',$arr);
// "Thor, Captain America, Iron Man"