我有一个对象和内容
Braintree_Result_Successful Object
(
[success] => 1
[_returnObjectName:private] => transaction
[transaction] => Braintree_Transaction Object
(
[_attributes] => Array
(
[id] => grmjyg
假设此变量为 $ result 我正试图达到 id 。我想我可以达到它
$result->transcation->_attributes['id']
但是我收到了一个错误。我怎样才能达到它?
答案 0 :(得分:2)
尝试正确拼写:)
$result->transaction->_attributes['id']