and*_*sto 6 php api foreach json
如何使用PHP从JSON对象获取数据?:
[
{
"name": "Anders",
},
{
"name": "Chris",
},
{
"name": "Peter",
}
]
Run Code Online (Sandbox Code Playgroud)
这是我的PHP代码:
$url = 'http://urltotheapi';
$content = file_get_contents($url);
$json = json_decode($content, true);
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
45625 次 |
| 最近记录: |