Let's say I have an Array $testes
that gets 2 arrays $variavel1
and $variavel2
. So I make $this->set('testes', $testes)
to use in the view.
In the View how do I access the values of $variavel1
and $variavel2
? I made a foreach and tried $testes['$variavel1']['campo']
, but only gives Undefined Index
in $variavel1
.
Example, how to access the data in this Array?
Array (
[0] => Array (
[ProcuraProdutoPedOnline] => Array (
[cd_familia] => 3
[ds_familia] => ACESSORIOS
)
)
[1] => Array (
[ProcuraProdutoPedOnline] => Array (
[cd_familia] => 1
[ds_familia] => CALCADOS
)
)
)
E
Array (
[0] => Array (
[VwEstPedOnline] => Array (
[cd_seq_pedido] => 2034
)
)
[1] => Array (
[VwEstPedOnline] => Array (
[cd_seq_pedido] => 2038
)
)
)
$testes
is getting like this: $testes = array($cdSeqPeds, $familias);