用到函数
array_column()
implode()
例子:
$gameidList = Db::table("$qpadmin.config_game_list")->field('gamename')->where(['gameid'=>['in',9,10]])->select();
$gameildArray = array_column($gameidList,'gamename');
if(count($gameildArray)<2){
$gid_str = $gameildArray['0'];
}else{
$gid_str = implode(',',$gameildArray);
}