-
二维数组去复
-
$a=array(
-
'0'=>array("a"=>"red","b"=>"green","c"=>"red","d"=>'hey'),
-
'1'=>array("a"=>"red","b"=>"green","c"=>"red","d"=>'hey'),
-
'2'=>array("a"=>"node","b"=>"green","c"=>"red","d"=>'hey')
-
);
-
foreach($a as $key=>$value){
-
$data[] =implode(',', $value);
-
}
-
$res = array_unique($data);
-
foreach($res as $key){
-
$array[] = explode(',', $key);
-
}
PHP 二维数据去重复值方法(去重)
最新推荐文章于 2023-03-13 23:18:57 发布