我想联合两个数组,覆盖重复的键,但不想重新索引所有索引。是否有一些功能可以做到这一点?
我需要两者的联合结构,因此每个键中的内容无关紧要。
阵列 1:
[820]
[name1]
[id] = "My Name"
[name2]
[id] = "Your Name"
[830]
[id] = "Mothers Name"
阵列 2:
[815]
[name1]
[id] = "IDs Name"
[820]
[name1]
[id] = "Names Name"
[id] = "Last ID ID"
结果应该是
[815]
[name1]
[id] = //does not matter
[820]
[name1]
[id] = //does not matter
[name2]
[id] = //does not matter
[id] = //does not matter
[830]
[id] = //does not matter