//二维数组去掉重复值 /* * $array 二维数组 * $stkey 一级数组键是否保留(可为非数字) true:保留 false:不保留 * $ndkey 一级数组键是否保留(二级数组键必须相同) true:保留 false:不保留 */ public function a_array_unique($array){ $out = array(); foreach ($array as $key=>$value) { if (!in_array($value, $out)){ $out[$key] = $value; } } $out = array_values($out); return $out; }
二维数组去掉重复值
最新推荐文章于 2023-03-21 21:15:00 发布