I have the following array, named $usergrouppermissions:
Array
(
[0] => Array
(
[UserGroupPermission] => Array
(
[group_id] => 1
[permission_id] => 4
)
)
[1] => Array
(
[UserGroupPermission] => Array
(
[group_id] => 1
[permission_id] => 5
)
)
[2] => Array
(
[UserGroupPermission] => Array
(
[group_id] => 1
[permission_id] => 6
)
)
[3] => Array
[...]
In a loop, i build another array like this, named $searchme:
Array
(
[UserGroupPermission] => Array
(
[permission_id] => 1
[group_id] => 1
)
)
Now, i want to check, if given array above exists in the numeric-indexed array at the top. I currently do this:
$result = Set::contains($usergrouppermissions, $searchme);
The result is always false. Do i get something wrong here? What is the problem?