【发布时间】:2012-02-12 07:12:41
【问题描述】:
如何修改此 xml 数据以列表格式显示?
foreach ($dataArray['simpleforecast']['forecastday'] as $arr) {
$html .= "<td align='center'>" . $arr['date']['weekday'] . "<br />";
$html .= "<img src='http://icons-pe.wxug.com/i/c/a/" . $arr['icon'] . ".gif' border=0 /><br />";
$html .= "<font color='red'>" . $arr['high'][$tempScale] . $tempUnit . " </font>";
$html .= "<font color='blue'>" . $arr['low'][$tempScale] . $tempUnit . "</font>";
$html .= "</td>";
}
【问题讨论】:
-
数据还向我显示了包括当天在内的 6 天预测......我如何修改它以不显示当天。谢谢
-
以列表格式而不是水平排列我的外部数据,但 M_rk 通过将标签更改为
- 帮助我解决了这个问题。
-
现在我需要了解如何制作它,以便它不会向我显示当前日期信息,而是跳过它并仅显示其余信息……例如,如果今天是星期一。我只希望它显示星期二星期三星期四等。谢谢