小编qwe*_*nau的帖子

如何查看此时间戳是今天,明天还是后天?

我想知道如何检查时间戳是今天,明天还是后天.

我有例如:

$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 date

9
推荐指数
1
解决办法
1万
查看次数

如何在PHP中将Ymd H:i:s转换为Ymd?

如何在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)

提前致谢.

php time date

6
推荐指数
2
解决办法
1万
查看次数

标签 统计

date ×2

php ×2

time ×1