PHP 获取数组里面值
string(112) "{"code":"100","user":{"name":"张三"},"msg":"获取成功"}"
PHP 怎么获取 数组里面的 user 括号里面name 值呢? php CodeIgniter?
[解决办法]
$s = '{"code":"100","user":{"name":"张三"},"msg":"获取成功"}';
echo json_decode($s)->user->name; //张三