JSON file:
{
"stock": [
{
"symbol": "AVGO",
"name": "Broadcom Ltd.",
"sector": "Technology",
"industry": "Semiconductors",
"SCTR": "97.8",
"delta": "2.5",
"close": "154.97",
"vol": "2297509"
},
{
"symbol": "CBS",
"name": "CBS Corp.",
"sector": "Cyclicals",
"industry": "Entertainment",
"SCTR": "92.3",
"delta": "-3.6",
"close": "53.58",
"vol": "4045416"
}
]
}
PHP:
$jsona = json_decode($json, true);
echo $jsona['stock']['symbol'];
Why I can't get the symbol? And how can I get all symbol value? Thanks!