You are here

function rules_forms_equal_array_values in Rules 6

Returns TRUE if both arrays contain the same values, regardless of their keys and value ordering.

Related topics

1 call to rules_forms_equal_array_values()
rules_forms_condition_element_value in rules_forms/rules_forms.rules.inc
Condition implementation: Check a form element value.

File

rules_forms/rules_forms.rules.inc, line 357
Rules integration to provide form support

Code

function rules_forms_equal_array_values($array1, $array2) {
  $diff1 = array_diff($array1, $array2);
  $diff2 = array_diff($array2, $array1);
  return empty($diff1) && empty($diff2);
}