duanduo0520
2016-06-11 15:01过滤具有多个值的多维数组
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.
- 点赞
- 回答
- 收藏
- 复制链接分享
1条回答
为你推荐
- 过滤多维数组中的字段,根据键将它们放在新数组中。 [PHP]
- filtering
- arrays
- php
- 3个回答
- 过滤具有相似字符的多维数组
- json
- arrays
- php
- 2个回答
- 过滤具有多个值的多维数组
- filter
- arrays
- php
- 1个回答
- 使用多个值过滤和排序多维数组
- filtering
- sorting
- arrays
- php
- 5个回答