我有一個數組中的團隊列表以及他們在另一個數組中的相應團隊成員。
我需要將它們組合在一個數組中,以便在每個組中,相應的組員應該列在單個下拉列表中,其中組員和組員應該可以選擇。的teamlead2
如何在cakephp中將數組分組?
Array
(
[6] => teammember3
[7] => teammember4
)
teamlead1
Array
(
[4] => teammember1
[5] => teammember2
)
團隊成員陣列的
Teamlead陣列
Array
(
[1] => teamlead1
[2] => teamlead2
)
團隊成員陣列I需要列出它們作爲
[TeamLead1] => Array
(
[0] => Array
(
[1] => TeamLead1
)
[1] => Array
(
[4] => teammember1
[5] => teammember2
)
)
[TeamLead2] => Array
(
[0] => Array
(
[2] => TeamLead2
)
[1] => Array
(
[6] => teammember3
[7] => teammember4
)
)
請幫我解決這個問題。
它只會在下拉菜單中顯示團隊成員,對吧?但我想列出以相應團隊領導爲首的團隊成員。 – saran 2012-03-07 09:04:53