企业🤖AI Agent构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
~~~ foreach ($list as &$value){ $from_time=Db::table('txsh_group_chat')->where(['user_id'=>$user_id,'group_id'=>$value['group_id']])->field('latest_time')->find(); if($from_time['latest_time']==null){ $from_time['latest_time']==null; } $value['count']=$text->get_group_count($value['group_id'],$from_time['latest_time'],$value['latest_time']); } ~~~ foreach($list as $value)是无法添加属性,如$value['count'],必须加上&即foreach ($list as &$value)