I\'m trying to get this data [label] => For Rent
from a multi-dimensional array. Here is my array
Array ( [listing_id] => 0
[fields]
echo $yourArray['fees'][30]->label
It's not just an array... it's an array with an object in it. Use the ->
to access object properties.
Try
$array[fees][30]->label
Where $array
is whatever you're top level variable is.
You can access any value of array by their keys. simply access For Rent
like this :-
echo $arrayName['fees'][30]->label
This will display For Rent like ( An Arrow operator because to access an object attribute you have to use this )