如何获得精确的密钥';使用PHP的数组中的s值?
这是我的密码如何获得精确的密钥';使用PHP的数组中的s值?,php,Php,这是我的密码 $response = json_decode($result); print_r($response); 我得到了结果 stdClass Object ( [type] => http://developer.mailchimp.com/documentation/mailchimp/guides/error-glossary/ [title] => Resource Not Found [status] => 404 [detail] => T
$response = json_decode($result);
print_r($response);
我得到了结果
stdClass Object ( [type] => http://developer.mailchimp.com/documentation/mailchimp/guides/error-glossary/ [title] => Resource Not Found
[status] => 404
[detail] => The requested resource could not be found.
[instance] => )
我补充说
foreach($response as $key=>$val)
{
echo $key.'='.$val.'<br>';
}
foreach($key=>$val)
{
回显$key.'='.$val.
';
}
但我想知道如何获得详细信息的确切键和值。如何得到它?
谢谢json_decode()中有一个问题,您必须传递2个参数“true”,如下
$response = json_decode($result,true);
print_r($response);
->
因为您正在访问一个对象。
$response = json_decode($result,true);
print_r($response);