0
I am trying to add an array that is a return of a database query, this array is nothing more than an add-on I want inside my $this->request->data['Curso'], but the problem is array_push is similar to $array[] = 'value'; then when I debug mine $this->request->data['Curso'], the array_push inserted a índice 0 where inside it goes all my array I passed in the pusharray_, what I must do not create this índice 0 and just add the array directly?
OBS: the array fields are the indexes that need to be inside $this->request->data['Curso'].
array_push($this->request->data['Curso'], $escola_infos[0]['EscolaAdicional']);
This is the database array:
Array
(
[0] => Array
    (
        [EscolaAdicional] => Array
            (
                [fundada_em] => 
                [duracao_aula] => 50
                [porque_estudar_nesta_escola] => - A escola está construída no estilo típico de praia com telhado de palha e jardins onde os estudantes relaxam e desfrutam da natureza.
- +3 salas de aula.
 - Sala de reuniões para estudantes.
 - Cozinha equipada .
- Terraço e Varanda.
- Sala de reuniões para estudantes.
- Cafeteria.
- Calendário semanal de atividades recreativas e tours.
- Acesso livre a Internet - WI FI.
 - Café, chá, leite e água refrigerada.
                       [precisa_saber] => - A escola estará fechada em 2016: Jan 1 / Feb 5 / Mar 16 / Apr 3 / May 1 / Sep 16 / Nov 2 / Nov 16 / Dec 25.
- Quartos Duplos somente para dois estudantes viajando juntos.
 - Serviço de lavanderia não será incluso na acomodação.
 - Transfer e noite extra disponíveis neste campus.
 - Taxa extra para acomodação com banheiro individual (valores a parte/ consultar).
 - Material será emprestado pela escola.
                [deficiente] => 
                [multimidia] => 1
                [laboratorio] => 
                [wifi] => 1
                [biblioteca] => 
                [cozinha] => 1
                [lounge] => 1
                [cafe] => 1
 )
    )
)
Everything that’s inside of [EscolaAdicional] I want you to go into $this->request->data['Curso']
Only when I use array_push was supposed to go in
 ['Curso'] => array(
[fundada_em] => 
[duracao_aula] => 50
more code´...
only it’s coming in like this 
['Curso'] => array(
[0]=> array(
[fundada_em] => 
[duracao_aula] => 50
more code´...
Hello has how you post the array template that you are getting and what you would like to have?
– Aloiso Gomes
updated the question
– Michel Henriq