2017-03-03 99 views
0

我有一個簡單的應用程序,它從JSON合成器中的部族API衝突得到響應。響應看起來是這樣的:在樹枝中的多維數組php

{"items":[{"tag":"#L22Y9C0P","name":"Team Dynamatrix","type":"inviteOnly","location":{"id":32000113,"name":"India","isCountry":true,"countryCode":"IN"},"badgeUrls":{"small":"https:\/\/api-assets.clashofclans.com\/badges\/70\/jC8f86zyZeATqqGJ7M9dgLEcEBynlEYyCW19eHS6Yjs.png","large":"https:\/\/api-assets.clashofclans.com\/badges\/512\/jC8f86zyZeATqqGJ7M9dgLEcEBynlEYyCW19eHS6Yjs.png","medium":"https:\/\/api-assets.clashofclans.com\/badges\/200\/jC8f86zyZeATqqGJ7M9dgLEcEBynlEYyCW19eHS6Yjs.png"},"clanLevel":7,"clanPoints":14009,"requiredTrophies":0,"warFrequency":"always","warWinStreak":5,"warWins":87,"warTies":5,"warLosses":69,"isWarLogPublic":true,"members":26},{"tag":"#LYPL20Y0","name":"J. Dynamatrix","type":"inviteOnly","location":{"id":32000006,"name":"International","isCountry":false},"badgeUrls":{"small":"https:\/\/api-assets.clashofclans.com\/badges\/70\/JSG91YdiTEH7CH2SLBOUjWaP_3at4j0alq711p-VhaQ.png","large":"https:\/\/api-assets.clashofclans.com\/badges\/512\/JSG91YdiTEH7CH2SLBOUjWaP_3at4j0alq711p-VhaQ.png","medium":"https:\/\/api-assets.clashofclans.com\/badges\/200\/JSG91YdiTEH7CH2SLBOUjWaP_3at4j0alq711p-VhaQ.png"},"clanLevel":8,"clanPoints":12920,"requiredTrophies":1000,"warFrequency":"always","warWinStreak":3,"warWins":118,"isWarLogPublic":false,"members":25}],"paging":{"cursors":{}}} 

現在,我怎麼能訪問和顯示名稱和使用<ul></ul>標籤視圖文件戰隊的其他東西?

有關API的詳細信息,結賬:https://developer.clashofclans.com/

+0

你試過了什麼? – hassan

+1

堆棧溢出不是一個代碼寫入服務,它預計你試圖自己編碼。我建議你對你的問題做一些研究(也許試試頁面頂部的搜索框),並嘗試自己編寫一些代碼。如果/當您遇到任何與您的代碼有關的問題時,請再次提問並解釋您所嘗試的內容,以及爲什麼它不適合您。請參閱[如何提問](http://stackoverflow.com/help/how-to-ask)尋求幫助,提出一個很好的問題以及[最小,完整,可驗證的示例](http://stackoverflow.com/幫助/ MCVE)。 – bc004346

+0

@ bc004346我嘗試了很多,但沒有成功。所以,最後,我只有一個選擇。那是在這裏問。 – xXAlphaManXx

回答