Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // http://vladimir-awm.ru
- 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;
- }
- $all = unique_multidim_array($all,'0');
- foreach ($all as $value) {
- echo implode("\t", $value)."<br />";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement