我返回了这个对象:
Array
(
[0] => SimpleXMLElement Object
(
[@attributes] => Array
(
[Desc] => Amount should be numeric.
)
)
[1] => SimpleXMLElement Object
(
[@attributes] => Array
(
[Desc] => Please enter your Reference Number.
)
)
)
我怎样才能得到 desc 值?我需要同时获取 Desc 值('金额应该是数字。'和'请输入您的参考号。')
我努力了:
$res = $str[0];
它返回:
SimpleXMLElement Object
(
[@attributes] => Array
(
[Desc] => Amount should be numeric.
)
)