안녕하세요 여러분, last.fm에서 정보를 얻으려고하고 있는데 앨범 이름 등을 얻고 있습니다.하지만 2 번 줄에서 가져 가고 싶습니다. 어떻게해야합니까?이 줄에서 가져 오기 <topalbums artist = "Adele">
<topalbums artist="Adele" page="1" perPage="1" totalPages="55092" total="55092">
^여기에서 이름, 페이지, perpage 및 totalpages
<lfm status="ok">
<topalbums artist="Adele" page="1" perPage="1" totalPages="55092" total="55092">
<album>
<name>21</name>
<playcount>52308837</playcount>
<mbid>c45e0e0e-48c9-4441-aac3-2f2b34202d3c</mbid>
<url>https://www.last.fm/music/Adele/21</url>
<artist>
<name>Adele</name>
<mbid>cc2c9c3c-b7bc-4b8b-84d8-4fbd8779e493</mbid>
<url>https://www.last.fm/music/Adele</url>
</artist>
<image size="small">
https://lastfm-img2.akamaized.net/i/u/34s/c894af1e6a735b9bbb2a0312c7719f40.png
</image>
<image size="medium">
https://lastfm-img2.akamaized.net/i/u/64s/c894af1e6a735b9bbb2a0312c7719f40.png
</image>
<image size="large">
https://lastfm-img2.akamaized.net/i/u/174s/c894af1e6a735b9bbb2a0312c7719f40.png
</image>
<image size="extralarge">
https://lastfm-img2.akamaized.net/i/u/300x300/c894af1e6a735b9bbb2a0312c7719f40.png
</image>
</album>
</topalbums>
</lfm>
빠른 방법은 복사/붙여 넣기 또는 DOMDocument를 또는 SimpleXML을을 사용을 ... 발견? – Gntem
예를 들어 ($ xml as $ albums) $ adele = albums-> topalbums-> adele –