Answers for "php code to implode after ,"

PHP
7

php implode

$arr = array('Hello','World!','Beautiful','Day!');
echo implode(" ",$arr);
// Outputs: 'Hello World! Beautiful Day!'
Posted by: Guest on June-16-2020
6

php implode

$colors = array("red","blue","green");
$colorsCSV= "'".implode("','",$colors)."'";
//$colorsCSV: 'red','blue','green'
Posted by: Guest on November-27-2019
0

php implode

$arr = ['Thor','Captain America','Iron Man'];
echo implode(', ',$arr);
// "Thor, Captain America, Iron Man"
Posted by: Guest on November-18-2020

Browse Popular Code Answers by Language