我尝试通过 php 读取 json
{
"data": [
{
"id": "3043252fsdgdf36360354",
"name": "name1",
"access_token": "CAAIf3VEtVSoBAHrVxHL16zt4H5OvwBmdfgs4F3auPE0NZBx5PmIujBAdqw0Cv4bZACXytT1O1y6FHEZA25E1aqQZD"
},
{
"id": "3326848fdgsdfgsdf03424168",
"name": "name2",
"access_token": "CAAIf3VEtVSoBAJinePVdfgsdfgMxuY3zaj9AimaoKx7VIO9jCqZCHC6ZBixL1n6ZC72LTMn0ZB4T8rOHD27WmzbBVgvUwgspeEZD"
}}
我试试这个代码
$sfgsdfg= $json_a=json_decode($read,true);
echo $json_a['data'][3043252fsdgdf36360354];
echo $json_a['3043252fsdgdf36360354'][access_token];
不使用这个 php 代码我需要帮助才能阅读它
我需要通过 3043252fsdgdf36360354 选择 access_token 作为 echo $json_a['data'][3043252fsdgdf36360354]['access_token'];
我只需要按 id 读取。mysql 命令。选择 access_token 其中 id ='3326848fdgsdfgsdf03424168';