I think it should not be so difficult to solve but i can’t get the solution.
I’m trying to implode an array in order to have this result :
$new_array = "755, 646, 648, 260, 257, 261, 271, 764, ..."
Here is my array :
Array
(
[0] => Array
(
[0] => 755
[1] => 646
)
[1] => Array
(
[0] => 648
[1] => 260
[2] => 257
[3] => 261
)
[2] => Array
(
[0] => 271
)
[3] => Array
(
[0] => 764
[1] => 643
[2] => 260
[3] => 263
[4] => 756
[5] => 763
[6] => 762
[7] => 259
[8] => 257
[9] => 758
[10] => 261
[11] => 768
[12] => 757
[13] => 647
)
)
I know how to do this with a simple array :
$newarray = implode(", ", $array);
I know how to get the key (with array_keys
)
$new_array = implode(", ", array_keys($array));
I’ve tried with array_map
but without result for the moment.
Coud you help me and point me in the right direction ?