I'm trying to implode a multi-dimensional array, but I'm missing something.
This is the array:
Array
(
[0] => Array
(
[0] => Brand 1
)
[1] => Array
(
[0] => Brand 2
)
)
So after some google-ing I found a couple of solutions but they all gave me different errors.
I read that array_map()
should work, but I can't figure out what the second parameter should be.
I'm getting the following error:
Warning: array_map() expects at least 2 parameters, 1 given in
This is my code:
$imploded = implode("','",array_map($brand_array));
$brand_array
is a newly created array constructed from an in_array
function
The goal is to get a comma seperated string like:
brand1, brand2