0
我有這樣的代碼雅虎天氣預報 - <yweather:預測
require('magpierss/rss_fetch.inc');
$url = 'http://weather.yahooapis.com/forecastrss?p=AUXX0013'
$rss = fetch_rss($url);
$title = $rss->items[0]['title'];
$description = $rss->items[0]['description'];
如何利用數據,例如(代碼= 「33」)從XML的這部分
<yweather:forecast day="Thu" date="25 Sep 2014" low="43" high="57" text="Mostly Clear" code="33"/>
所以,你的問題是如何解析PHP中的XML? – kay 2014-09-25 19:23:19
我明白如何解析,但我對這部分有問題 – blek 2014-09-25 19:24:25