My first array is the needle:-
$needle = Array
(
[2] => authenticated user
[3] => administrator
[13] => first keyword
[23] => second keyword
[33] => third keyword
)
Second array where this needle should be matched is a multi-dimensional array:-
$hay = Array
(
[0] => Array
(
[value] => first keyword
)
[1] => Array
(
[value] => second keyword
)
[2] => Array
(
[value] => tenth keyword
)
)
I am hoping that if needle
array matches the hay
array, I should get true.
I tried using this but it doesn't work:-
if (in_array(strtolower($hay), $needle)) {
...
}
Thanks.