How to combine all array values into a string from key value array in PHP

1 Answer

0 votes
$array = ['a' => "PHP", 'b' => "Java", 'c' => "Python"];

$s = implode(" ", $array);

echo $s;
 
  
/*
run:
   
PHP Java Python 
   
*/

 



answered Oct 5, 2017 by avibootz
...