parse json nested array form url in php

Solutions on MaxInterview for parse json nested array form url in php by the best coders in the world

showing results for - "parse json nested array form url in php"
Andrea
26 Aug 2019
1$json = '
2{
3    "type": "donut",
4    "name": "Cake",
5    "toppings": [
6        { "id": "5002", "type": "Glazed" },
7        { "id": "5006", "type": "Chocolate with Sprinkles" },
8        { "id": "5004", "type": "Maple" }
9    ]
10}';
11
12$yummy = json_decode($json, true);
13
14echo $yummy['toppings'][2]['type']; //Maple
15