数组A:
$a = [
0 => ['num' => 100],
1 => ['num' => 105],
3 => ['num' => 253],
N.......
]
数组B:
$b = [
0 => [
'id' => 1,
'num' => 300
],
1 => [
'id' => 2,
'num' => 600
],
2 => [
'id' => 3,
'num' => 900
],
N........
]
疑问:我想要遍历出数组A里面num小于500的记录,然后用数组B里面的num去填充它,如果数组A里面的num已经等于500就跳过,最后还要有个数组来记录数组B中,那些ID参与了填充····,求指教下代码如何提现...貌似要递归?
呼如林
蓝山帝景
jeck猫
守着星空守着你