PHP SimpleXML + Get Attribute

前端 未结 7 1328
猫巷女王i
猫巷女王i 2020-12-01 18:32

The XML I am reading looks like this:



    The Big Bang Theory
    http://www.tvrage.com/The_Bi         


        
7条回答
  •  抹茶落季
    2020-12-01 18:44

    You need to use attributes

    I believe this should work

    $id = $xml->show->attributes()->id;
    

提交回复
热议问题