我这里有数据:首先,我的第一个函数名为 getsiteaccounts() 的结果
Array
(
[0] => Array
(
[SiteID] => 2
[AID] => 5
)
[1] => Array
(
[SiteID] => 2
[AID] => 3
)
[2] => Array
(
[SiteID] => 6
[AID] => 4
)
我的第二个函数的结果名为 bindGHComponentsToSites()
Array
(
[2] => Array
(
[SiteID] => 2
[Balance] => 19000.00
[MinBalance] => 100000.00
[MaxBalance] => 1000000.00
[OwnerAID] => 5
[GroupID] => 1
[Deposit] => 1500
[Reload] => 1000
[Redemption] => 1000
)
)
然后,添加指向 OwnerAID 列表的 [CorpAID] 键。顺便说一下,OwnerAID 和 AID 是一样的。如您所见,SiteID => 2 由两个 OwnerAID => 5 和 3 拥有。这应该是结果:
Array([0])=> Array (
[SiteID] => 2
[Balance] => 19000.00
[MinBalance] => 100000.00
[MaxBalance] => 1000000.00
[OwnerAID] => 5
[GroupID] => 1
[Deposit] => 1500
[Reload] => 1000
[Redemption] => 1000
[CorpAID] => Array(
[0] => 5
[1] => 3
)
)
)
SiteID => 6 不应打印,因为它仅由一个 AID 拥有。有可能做到吗?请以正确的方式指导我。先感谢您。