codepad
[
create a new paste
]
login
|
about
Language:
C
C++
D
Haskell
Lua
OCaml
PHP
Perl
Plain Text
Python
Ruby
Scheme
Tcl
<?php $arr = array(1=>'1233',2=>'12334',3 =>'Hello' ,4=>'Hello', 5=>'U'); // Convert every value to uppercase, and remove duplicate values $withoutDuplicates = array_unique($arr); // The difference in the original array, and the $withoutDuplicates array // will be the duplicate values $duplicates = array_diff($arr, $withoutDuplicates); print_r($duplicates);
Private
[
?
]
Run code
Submit