0
我想聯合兩個數組,覆蓋重複鍵但不想重新索引所有索引。有沒有一些功能可以做到這一點?array_merge和array1 + array2之間的折衷
我需要兩者的聯合結構,所以每個關鍵字中的內容都無關緊要。
陣列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
THX它每工作很好:) –