标签:code turn uniq yun unique tmp func public set
/**
* 数组去重
*/
public function arrayUnique($arr) {
$count = count($arr);
$res = [];
for ($i = 0;$i < $count ;$i++) {
$tmp = $arr[$i];
unset($arr[$i]);
if (!in_array($tmp,$arr)) {
$res[] = $tmp;
}
}
return $res;
}
标签:code turn uniq yun unique tmp func public set
原文地址:https://www.cnblogs.com/jiqing9006/p/12910948.html