I'm just trying to get into PHP and understand the core concepts, so have been messing around with arrays, jsons, etc. For this, I've tried everything, yet I cannot get to access the "Name" component of my Json. I recieve it from a CURL HTTP Request, decode it from a json then attempt to go from there. The JSON looks like:
[
{
"food1": "blah",
"food2": "blah",
"food3": "blah"
},
{
"food1": "blah",
"data": [
{
"name": "I need to access this",
"name2": "Another name"
}
]
}
]
I've tried $Result[0]["data"]["name"]
, $result[0][1]["data"]["name"]
and plenty more combinations of that kind of nature, yet still haven't been able to figure it out. Any help would be greatly appreciated, thanks. :)