I have this array_map:
/* Return an array of _octopus_ids */
$offices = array_map(
function($post) {
return array(
'id' => get_post_meta($post->ID, '_octopus_id', true),
);
},
$query->posts
);
That returns the following:
array (size=10)
0 =>
array (size=1)
'id' => string '1382' (length=4)
1 =>
array (size=1)
'id' => string '1330' (length=4)
How can I implode that statement so I can get just the strings?
I've tried the following:
$test = implode(', ', $offices);
var_dump($test);
The var_dump($test) returns the following: Array, Array, Array, Array, Array, Array, Array, Array, Array, Array
.
I get the Array to string conversion
error - What am I doing wrong? I'd love to just print out 1382 and then 1330