Accessing @attribute from SimpleXML

前端 未结 8 1276
后悔当初
后悔当初 2020-11-22 00:33

I am having a problem accessing the @attribute section of my SimpleXML object. When I var_dump the entire object, I get the correct output, and wh

8条回答
  •  不思量自难忘°
    2020-11-22 01:19

    If you're looking for a list of these attributes though, XPath will be your friend

    print_r($xml->xpath('@token'));
    

提交回复
热议问题