获得属性可能重复:
PHP get values from SimpleXMLElement array如何从的SimpleXMLElement
SimpleXMLElement Object
(
[@attributes] => Array
(
[TotalAmount] => 4.75
)
)
$services_arr->attributes
返回null
$services_arr->@attributes
返回一个错误
我的问题是:如何得到金额4.75
?
SimpleXMLElement对象 ( ) 此空白对象返回。 – test 2012-07-23 09:54:12
感谢它的工作。 – test 2012-07-23 09:57:42
刚刚编辑我的解决方案,以获得更好的结果。 – uzyn 2012-07-23 09:59:35