ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
~~~ 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)