Tnho 12 times cadastrados em uma tabela e quero dividi-los em 3 grupos. Então recebo esses times em forma de array e uso o array_chunk
para dividi-los, que irá formar os 3 grupos de 4 times que quero.
Mas não estou conseguindo acessar o NAME_TEAM
, ja tentei várias formas e não consigo. Alguém poderia me ajudar?
Veja como fica montado o array.
Array
(
[0] => Array
(
[0] => stdClass Object
(
[id_t] => 222
[name_team] => Atletico GO
[name_coach] => Afonso de Carvalo
[active_team] => 1
)
[1] => stdClass Object
(
[id_t] => 223
[name_team] => Atletico MG
[name_coach] => Levir culpi
[active_team] => 1
)
[2] => stdClass Object
(
[id_t] => 224
[name_team] => Palmeiras
[name_coach] => Cuca
[active_team] => 1
)
[3] => stdClass Object
(
[id_t] => 225
[name_team] => Flamengo
[name_coach] => Zé Ricardo
[active_team] => 1
)
)
[1] => Array
(
[0] => stdClass Object
(
[id_t] => 226
[name_team] => Corinthians
[name_coach] => José da Silva
[active_team] => 1
)
[1] => stdClass Object
(
[id_t] => 227
[name_team] => Santos
[name_coach] => Dorival Junior
[active_team] => 1
)
[2] => stdClass Object
(
[id_t] => 228
[name_team] => Grêmio
[name_coach] => Renato Portallupi
[active_team] => 1
)
[3] => stdClass Object
(
[id_t] => 229
[name_team] => Ponte Preta
[name_coach] => Ernando
[active_team] => 1
)
)
[2] => Array
(
[0] => stdClass Object
(
[id_t] => 242
[name_team] => Vasco
[name_coach] => Milton Santos
[active_team] => 1
)
[1] => stdClass Object
(
[id_t] => 245
[name_team] => Botafogo
[name_coach] => Jair Ventura
[active_team] => 1
)
[2] => stdClass Object
(
[id_t] => 246
[name_team] => São Paulo
[name_coach] => Rogério Ceni
[active_team] => 1
)
[3] => stdClass Object
(
[id_t] => 247
[name_team] => Cruzeiro
[name_coach] => Mano Menezes
[active_team] => 1
)
)
)