If Array Values Match Another Array’s Values, Then

Here’s one way to solve this:

  • sort both arrays
  • loop through them and compare them item by item (they should be equal, because arrays are sorted)

.

sort( $evaltypesReq );
sort( $evaltypesSch );
$containsAllValues = true;
foreach ( $evaltypesReq as $k => $v ) {
    if ( $evaltypesSch[$k] !== $v ) $containsAllValues = false;
}