I have two solid methods for you. The first is a "variadic approach" (... splat operator) and the second is a classic foreach loop leveraging array_column().
Code: (Demo)
$array=[
['Bob','Freddy'],
['IT Dev','Programmer'],
[123,23423]
];
// Use this to see that both methods are flexible and produce the same result,
// so long as all subarrays have equal length.
// If there are differences in length, depending where the hole is, the results
// between the two methods will vary slightly.
// (The 1st method best preserves the intended output structure.)
/*$array=[
['Bob','Freddy','Jane'],
['IT Dev','Programmer','Slacker'],
[123,23423,0],
['more1','more2','more3']
];*/
// this one requires php5.6 or better
$imploded_columns=array_map(function(){return implode(' - ',func_get_args());},...$array);
var_export($imploded_columns);
echo "\n\n";
unset($imploded_columns);
// or you can go with a sub-php5.6 version:
foreach($array[0] as $k=>$v){
$imploded_columns[]=implode(' - ',array_column($array,$k));
}
var_export($imploded_columns);
Output from both methods:
// variadic method
array (
0 => 'Bob - IT Dev - 123',
1 => 'Freddy - Programmer - 23423',
)
// foreach method
array (
0 => 'Bob - IT Dev - 123',
1 => 'Freddy - Programmer - 23423',
)