I have an array:
array:3 [▼
0 => 1
1 => 1
2 => 2
]
I want to count how many times a number is equal in the array and if the count of equal numbers is 2 push the value into an other array.
so:
in this case 1 is equal 2 times, so i want to push 1 into an array.
How do i achieve this?