Created
February 19, 2017 08:24
-
-
Save CB9TOIIIA/8dd922cac2428f8a760712402945e05d to your computer and use it in GitHub Desktop.
Убрать дубли по ключу в многомерном массиве
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$BigArAuto = array_replace_recursive($GetTagsAndCountTodayar,$bigarr); | |
$CountBigArAuto = count($BigArAuto); | |
function unique_multidim_array($array, $key) { | |
$temp_array = array(); | |
$i = 0; | |
$key_array = array(); | |
foreach($array as $val) { | |
if (!in_array($val[$key], $key_array)) { | |
$key_array[$i] = $val[$key]; | |
$temp_array[$i] = $val; | |
} | |
$i++; | |
} | |
return $temp_array; | |
} | |
$details = unique_multidim_array($BigArAuto,'name'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment