Is there anyway to find duplicates in array values? like:-
$cars = array("Volvo", "BMW", "Toyota", "BMW", "Toyota");
As BMW and Toyota occurs twice output would be BMW and Toyota i know about array_search() but in that you have to provide what you want to search.. i can match array value with respect to key but size of array can vary, It would be great if anyone help me out.