开发者

PHP time math calculations

开发者 https://www.devze.com 2022-12-23 04:58 出处:网络
Hallo, 开发者_C百科How can I calculate a current time moment + exactly one week? The same with month.

Hallo,

开发者_C百科How can I calculate a current time moment + exactly one week? The same with month. Thanks.


Check out the function strtotime() - very useful.

echo strtotime("+1 week"), "\n";


$nextWeek = time() + (7 * 24 * 60 * 60); 
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号