小编use*_*561的帖子

在 foreach 循环之外返回所有存储在 var 中的值

所以我假设某些东西被覆盖了,但我不确定如何停止它并检索循环外的所有值。有任何想法吗?

foreach($gallids as $gallterm)
{
    $postterms = wp_get_post_terms($gallterm, 'type', array("fields" => "slugs"));

    $checkmissing = $postterms[0];                  
    print_r($checkmissing); // Check Terms for missing images - works here.
}

print_r($checkmissing); // Check Terms for missing images - not working here 
                        // - seems to be getting last or first val only.
Run Code Online (Sandbox Code Playgroud)

php arrays variables foreach loops

3
推荐指数
1
解决办法
1万
查看次数

标签 统计

arrays ×1

foreach ×1

loops ×1

php ×1

variables ×1