foreach ($list as $k=> $teamGoods){
            if($teamGoods['status'] > 4){
                $_soldGoods[] = $teamGoods;
                unset($list[$k]);
            }
        }
        $list = array_merge($list, $_soldGoods);

 当没有状态为4的商品的时候合并数据 导致$list 为空

 以后还是先确定合并的参数为数组把。。 若类型果然坑人- -

 解决:

     $_soldGoods = array();
        foreach ($list as $k=> $teamGoods){
            if($teamGoods['status'] > 4){
                $_soldGoods[] = $teamGoods;
                unset($list[$k]);
            }
        }
        $list = array_merge($list, $_soldGoods);

 

 

相关文章:

  • 2021-05-16
  • 2021-04-09
  • 2021-11-09
  • 2021-10-01
  • 2022-01-18
  • 2022-12-23
  • 2022-12-23
  • 2021-05-21
猜你喜欢
  • 2022-01-13
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-29
相关资源
相似解决方案