Find if anything but certain strings are in an array
<p>Let's start with an example.<br>
$array['0'] is equal to value1. $array['1'] is equal to value2. $array['3'] is equal to value1.<br>
I need to write a function that checks if anything but a certain set of strings exists in an array.
<br>
If I allowed "value1" and "value2" to exist in an array, and I gave the function the array above, it would return true.
<br>
If I fed the function $array['0'] = 'value3' $array['1'] = 'value2', the function would return false because the array contains "value3" and only "value1" and "value2" are allowed in this example.<br>
Does a built-in PHP function that does this exist? If not, how would I go about writing it?  </p>
