I have data here: First, the result of my first function named getsiteaccounts()
Array
(
[0] => Array
(
[SiteID] => 2
[AID] => 5
)
[1] => Array
(
[SiteID] => 2
[AID] => 3
)
[2] => Array
(
[SiteID] => 6
[AID] => 4
)
And the result of my second function named 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
)
)
Then, add the key of [CorpAID] pointing to the list of OwnerAID. BY the way, OwnerAID and AID are the same. As you can see SiteID => 2 owned by two OwnerAID => 5 and 3. Here's should be the result:
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
)
)
)
The SiteID => 6 should not be print since it only owned by one AID. Is it possible to make it? Please guide me in proper way. Thank you in advance.