0
我想計算幾周後的確切時間(以秒爲單位)。我正在使用strtotime()
,但我只能使用硬編碼的週數工作。我的代碼:PHP中的strtotime()函數
$time = "Monday"; // any day
$weekDifference = 2; // variable of week difference
$myTime = strtotime("+weekDifference week $time"); // it does not works
// strtotime("+2 week $time ") this works
echo $myTime; // no value is printed