时间:2021-07-01 10:21:17 帮助过:2人阅读
$s = '{"code":"100","user":{"name":"张三"},"msg":"获取成功"}';echo json_decode($s)->user->name; //张三
json_decode 后就是对象/数组了,之后就容易了吧。
$s = '{"code":"100","user":{"name":"张三"},"msg":"获取成功"}';echo json_decode($s)->user->name; //张三