How to find out duplicate value in array PHP

+20 How to find out duplicate value in array PHP   // Create an array in PHP $data_array = array(‘laptop’, ‘mobile’, ‘computer’, ‘keyboard’, ‘laptop’, ‘mouse’, ‘printer’, ‘printer’, ‘printer’); // Now output is print_r(array_count_values($data_array)); Array ( [laptop] => 2 [mobile] => 1 [computer] => 1 [keyboard] => 1 [mouse] => 1 [printer] => 3 ) // …