i'm attempting to access an item in a variable being passed to me from a black box. When I use something like
var_dump($var)
to examine the contents of the variable I am given something that looks like this
array(2) {
'home' => array(6) {
'label'=> string(4) "home"
'title'=> string(15) "go to home page"
'link' => string(45) "....com/store/"
'first => bool(true)
'last' => null
'readonly' => null
}
'category2336' => array(6) {
'label' => string(9) "the title"
'link' => string(0) ""
'title' => null
'first' => null
'last' => bool(true)
'readonly' => null
}
}
How do I access the second key in this array (map)? Specifically the area labeled category2336.
$var['category2336']
.array_keys($var)
to get an array of all the keys, then do$keys[1]
.