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

1 Answer

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

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

echo $s;
 
  
/*
run:
   
a b c d 
   
*/

 



answered Oct 5, 2017 by avibootz
...