I have an associative array:
$comboUserPosts = array();
array(
'link'=> get_permalink(),
'dates'=> $value,
'title'=> get_the_title(),
'id'=> $post->ID
)
I need to output all values of id
like: "232,555,797"
I know I can do:
foreach ($comboUserPosts as $value) {
$value['id']
}
But I need to output that list of ids
in the following, and obviously I cannot insert that within the foreach
or it'll duplicate.
echo do_shortcode('[ajax_load_more pause="true" post_type="post" post__in="'.json_encode($comboUserPosts['id']).'" progress_bar="true" progress_bar_color="FF0080"]');
As you can see I tried using json_encode($comboUserPosts['id'])
but it is not accessing that object