is there a function to compare each value of an array to each other value of the same array and return matches?
hmm... what do you mean? Obviously an element in an array would match with itself and any duplicate element. Perhaps you want to use [man]array_count_values/man? Or are you really looking for [man]array_unique/man?
well..... to elaborate
my array has 3 keys i need to check against each other
$array[0] $array[1] $array[2]
if any of these equal each other i need to know which
You could do something like this:
$result = array(); for ($i = 0; $i < count($array); ++$i) { $result[$i] = array_keys($array, $array[$i]); }