i have array which has multiple duplicate values. now i want to get those duplicate values.
$roQ = Array
(
[0] => 2123
[1] => 2094
[2] => 2105
[3] => 2160
[4] => 2143
[5] => 2148
[6] => 2154
[7] => 2155
[8] => 2145
[9] => 2123
[10] => 2149
[11] => 2143
[12] => 2145
)
i tried following code which is not working. it returns incorrect result. how to get the all duplicate values in new array.
$c = array_count_values($roQ);
$val = array_search(max($c), $c);
$azq[] = $val;