-
-
//Remove duplicate values from the two-dimensional array - function array_unique_fb($array2D){
- foreach ($array2D as $v){
- $v = join("," ,$v); //For dimensionality reduction, you can also use implode to convert a one-dimensional array into a string connected with commas
- $temp[] = $v;
- }
$temp = array_unique($temp); //Remove repeated strings, that is, repeated one-dimensional arrays
- foreach ($temp as $k => $v){
- $temp[$k] = explode("," ,$v); //Reassemble the disassembled array
- }
- return $temp;
- }?>
-
Copy code
|