I have three multidimensional arrays. I want to filter out values in the first array that match two values in the other two arrays.
Array 1 $a contains location $a[LOC], quantity $a[QTY] and last activity date $a[DATE].
Array 2 $b contains all locations and their last activity date
Array 3 $c contains all locations and their current quantity
I need to remove from array $a the locations that appear in array $b which have an activity date bigger than that in array $a (for the same location) and remove from array $a the locations with quantities not matching the same location in array $c.
I have tried combinations of foreach loops with array_intersects but cant seem to get anywhere near what I need.
Any help would be greatly appreciated.