php去掉数组中重复的值php
php去掉数组中重复的值...
function a_array_unique($array){ $out = array(); foreach ($array as $key=>$value) { if (!in_array($value, $out)){ $out[$key] = $value; } } return $out; }
下一篇:php 7.2 一些注意事项
最新评论
热门推荐
function a_array_unique($array){ $out = array(); foreach ($array as $key=>$value) { if (!in_array($value, $out)){ $out[$key] = $value; } } return $out; }
下一篇:php 7.2 一些注意事项
我要评论