我对 RSS 雅虎天气预报有疑问。
我的案例:如何在 rss yahoo 天气预报中获取温度?
我的代码:我循环:
$current = $item->xpath('yweather:condition');<br>
$forecast = $item->xpath('yweather:forecast');<br>
end loop
{$forecast[0]['day']} - {$forecast[0]['date']} - {$forecast[0]['text']}. High: {$forecast[0]['high']} Low: {$forecast[0]['low']} || Code :{$forecast[0]['code']}
但因为{$forecast[0]['temp']}
不工作。