php字符串去重，过滤重复 //如果是数组，先转成字符串 $jsons = implode(",", $json); //去重字符串 $json = implode(',',array_unique(explode(',',$jsons))); //字符串转数组 $json = explode( ',',$json);另外还有数组直接去重；array_unique($input);