十月 Oct.cn - 数组
type: channel
link: https://oct.cn/tag/数组/
items: php字符串去重，过滤重复

php字符串去重，过滤重复
type: item
date: 2019-11-10T23:22:00+08:00
description: php字符串去重，过滤重复 //如果是数组，先转成字符串 $jsons = implode(",", $json); //去重字符串 $json = implode(',',array_unique(explode(',',$jsons))); //字符串转数组 $json = explode( ',',$json);另外还有数组直接去重；array_unique($input);