2016-11-26 91 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; 
    } 
}?> 

我確定這一定很簡單,但我不能弄明白。幫助讚賞。謝謝!

回答

相關問題