PHP check duplicate values in an array and return it

How to check duplicate values in an array and return it using PHP?Also telling php check wild card value in an array and return those values.For a example you want to check number of times that values exist and return that all values in an array.Check this example, you can understand this better.
Continue reading PHP check duplicate values in an array and return it