SHOW:
|
|
- or go back to the newest paste.
1 | <?php | |
2 | function removeDuplicates($array) { | |
3 | $result = array(); | |
4 | $check = array(); | |
5 | foreach ($array as $key => $value) { | |
6 | - | $test = print_r($value, true); |
6 | + | $test = print_r($value, TRUE); |
7 | if (!isset($check[$test])) { | |
8 | $check[$test] = TRUE; | |
9 | $result[$key] = $value; | |
10 | } | |
11 | } | |
12 | return $result; | |
13 | } | |
14 | ?> |