我怎样才能在php中访问属性值:
[photos] => SimpleXMLElement Object
(
[@attributes] => Array
(
[page] => 1
[pages] => 1
[perpage] => 24
[total] => 18
)
我尝试了以下内容:
$photos->@attributes['total'] ;
$photos->{'@attributes'}['total'] ;
以及此
的许多变体