How to echo on array with [data] array?
Pergunta
I came across this array structure, with a "[data] array" I don't know what it is, and I don't know how to bypass it to print, for example [0]['email']. ['data'][0]['email'] doesn't seem to work either. How can I do this?
Array ( [data] => Array ( [0] => Array ( [email] => xxx@xxx.com ) [1] => Array ( [email] => xxx@xxx.com ) ) )
Solução
$varname['data'][0]['email']
should work. Don't you forget to address array variable itself?
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow