我想知道如何检查时间戳是今天,明天还是后天.
我有例如:
$timestamp = "1313000474";
Run Code Online (Sandbox Code Playgroud)
如何查看此时间戳是今天,明天还是后天?
例如
if today then echo $output = "today";
if tomorrow then echo $output = "tomorrow";
if the day after tomorrow then echo $output = "dayaftertomorrow";
Run Code Online (Sandbox Code Playgroud)
这该怎么做?
编辑:更正了unix时间戳
先感谢您.
如何在PHP中将Ymd H:i:s转换为Ymd?
我有例如
$date = "2011-08-10 20:40:12";
Run Code Online (Sandbox Code Playgroud)
并希望将其转换为公正
$output = "2011-08-10";
Run Code Online (Sandbox Code Playgroud)
提前致谢.