How to echo on array with [data] array?
Domanda
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 ) ) )
Soluzione
$varname['data'][0]['email']
should work. Don't you forget to address array variable itself?
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow