找出数组中没有重复的值
<?php $array = [2,4,3,6,3,2,5,5]; $arr=array_count_values($array); foreach ($arr as $k=>$v){ if($v==1){ $str[]=$k; } } print_r($str);
<?php $array = [2,4,3,6,3,2,5,5]; $arr=array_count_values($array); foreach ($arr as $k=>$v){ if($v==1){ $str[]=$k; } } print_r($str);