我有两个阵列:
Array1:
ID: 1
ID: 2
ID: 3
ID: 4
ID: 5
Array2, with num Value:
ID: 2, NUM: 200
ID: 4, NUM: 400
我希望产出如下:(如果阵列没有记录,就再增加零)。
ID: 1, NUM: 0
ID: 2, NUM: 200
ID: 3, NUM: 0
ID: 4, NUM: 400
ID: 5, NUM: 0
I am new to PHP, tried array_diff and array_intersect but not find the clue, could you please let me know how can I do that?
感谢。