..。不止一次..。
$now = date("D, d M Y H:i:s O");
foreach ($items AS $item)
{
$currentDate = strtotime($now);
$pastDate = $currentDate-(60*5);
$formatDate = date("Y-m-d H:i:s", $pastDate);
echo "\t\t<item>\n";
echo "\t\t\t<pubDate>" . $formatDate . "</pubDate>\n" ;现在,我希望formatDate每次减少5分钟,我不希望每个元素都有相同的时间…谢谢
发布于 2011-07-26 04:56:35
$now = time();
foreach ($items AS $item)
{
echo "\t\t<item>\n";
echo "\t\t\t<pubDate>" . date("Y-m-d H:i:s", $now) . "</pubDate>\n" ;
echo "\t\t</item>\n";
$now -= (60*5);
}https://stackoverflow.com/questions/6822153
复制相似问题