2
I have the following structure:
$arrDados = Array (
[0] => Array (
[NumeroEmpenhoNumero] => Array (
[type] => NULL
[size] => 0
[deci] => 0
[code] => 0
)
)
[1] => Array (
[NumeroEmpenhoAno] => Array (
[type] => NULL
[size] => 0
[deci] => 0
[code] => 0
)
)
[2] => Array (
[UnidadeOrcamentaria] => Array (
[type] => NULL
[size] => 0
[deci] => 0
[code] => 0
)
)
[3] => Array (
[UnidadeExecutora] => Array (
[type] => NULL
[size] => 0
[deci] => 0
[code] => 0
)
)
[4] => Array (
[Historico] => Array (
[type] => NULL
[size] => 0
[deci] => 0
[code] => 0
)
)
[5] => Array (
[OperacaoCadastro] => Array (
[type] => NULL
[size] => 0
[deci] => 0
[code] => 0
)
)
);
I need to access something as:
$arrDados['NumeroEmpenhoNumero']['code']
or
$arrDados['NumeroEmpenhoNumero']['size']
but keeps giving error:
Undefined offset: 'Numeroempenhonumero' in ...on line 222
- How can I access these positions of this array?
- What is the correct syntax?
Just one observation, PHP does not have Multidimensional Array. It has Array of Array. The use is similar, but it is a totally different structure internally. In C#, for example, we have the 2 types: Differences between Jagged Array and Multidimensional Array in c#?
– Bacco