2016-11-26 110 views
0

Im循环播放一些帖子以获取附加到每个帖子的图库。我想收集所有只包含这些网址的数组中的所有网址。从循环中的数组获取值

<?php if ($the_query->have_posts()) { 
    while ($the_query->have_posts()) { 
     $the_query->the_post(); 
     if (get_post_gallery()) : 


        $gallery_images = get_post_gallery_images(); 

        // In each loop $gallery_images will contain a new 
        // array of urls. I would like to add these urls to collect all urls in another array. 

        ?> 
        <?php 
     endif; 
    } 
}?> 

我确定这一定很简单,但我不能弄明白。帮助赞赏。谢谢!

回答