...而不是一個時間......php:如何將日期時間減少爲每個項目的foreach ...?只有
$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" ;
現在,我想每一個時間爲5分鐘formatDate遞減,我不想對每個元素的同時...感謝
它的工作原理,謝謝 – smepie