How to compare 2 arrays in PHP?

This is the first array:\[code\]$possible_combinations = array( 1 => array(1), 2 => array(2), 3 => array(3), 4 => array(4), 5 => array(1, 2), 6 => array(1, 3), 7 => array(1, 4), 8 => array(2, 3), 9 => array(2, 4), 10 => array(3, 4), 11 => array(2, 3, 4), 12 => array(1, 3, 4), 13 => array(1, 2, 4), 14 => array(1, 2, 3), 15 => array(1, 2, 3, 4));\[/code\]This is the second array:\[code\]$seeking = array(2, 3, 4);\[/code\]As you can see \[code\]$possible_combinations[11]\[/code\] matches \[code\]$seeking\[/code\]. The value of $seeking in this case is 2, 3, 4 but it may be different at other times. How can I run a check against the$possible_combinations array to see if the $seeking array matches any of the values of that associative array. It should return the key of the match if there is one.
 
Back
Top