I have a multidimensional php array like this
Array
(
[0] => Array
(
[size] => M
[colour] => black
[quantity] => 10
)
[1] => Array
(
[size] => S
[colour] => blue
[quantity] => 10
)
)
and i have another array like this
Array
(
[size] => M
[colour] => black
)
How do i transverse to first array to find the array that matches the second one?.
Am totally clueless on how to go about this. Thanks
Consider first array is “mainarray” and second one is “comparearray”
note: if compare array is single array it is applicable. if that also multidimension array you should put foreach for that array also.