SimpleXML Reading node with a hyphenated name

后端 未结 2 523
走了就别回头了
走了就别回头了 2020-11-22 12:18

I have the following XML:




        
2条回答
  •  深忆病人
    2020-11-22 13:16

    I assume the best way to do it is to cast to array:

    Consider the following XML:

    
        example url
    
    

    You can access members, including attributes, using a cast:

    It makes everything easier. Hope I helped.

提交回复
热议问题