I have two multidimensional arrays:
Haystack
$haystack = array (
0 => array (
"child_element_id" => 11
"answer_id" => 15
),
1 => array (
"child_element_id" => 12
"answer_id" => 17
),
2 => array (
"child_element_id" => 13
"answer_id" => 21
)
)
Needle
$needle = array (
0 => array (
"child_element_id" => 12
"answer_id" => 17
),
1 => array (
"child_element_id" => 13
"answer_id" => 21
)
)
I want to check if all the key values from array "Needle" exists in the array "Haystack". What's the best practice for this? Thank you!