I want to check if an array only contains allowed element values (are available in another array).
Example:
$allowedElements = array('apple', 'orange', 'pear', 'melon');
checkFunction(array('apple', 'orange'), $allowedElements); // OK
checkFunction(array('pear', 'melon', 'dog'), $allowedElements); // KO invalid array('dog') elements
What is the best way to implement this checkFunction($a, $b) function?