我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

使用php添加1天的功能[复制]

This question already has an answer here:

  • adding 1 day to a DATETIME format value 7 answers

I have tring that contain date

i.e: 2018-07-18

Is there any function that get the string and add 1 day, so the result should be: 2018-07-19

Thanks in advanced

</div>

This should work:

$date = "2018-07-18";
$new_date = date('Y-m-d', strtotime($date. ' + 1 days'));

近期文章

  • 怎么用JAVA写一个四子棋,带解释和备注的最好是中文备注谢谢大佬
  • 如何查看部门的流
  • 将phpunit升级到最新版本
  • 转换数组值写入文件php
  • php mcrypt to javascript aes integration
  • PHP正则表达式帮助(preg_replace)[关闭]
  • 为什么我存储的MySQL程序如此之慢?
  • 在服务器上是否解压缩了PHP的lib?
  • 计算实际播种者的总数
  • MySQL字段名称进入PHP下拉菜单
  • PHP:根据值确定文本颜色
  • 用于标签的查找表,区分大小写
  • 使用PHP驱动程序的MongoDB聚合查询
  • PHP简单的BB代码 - 结束格式化
  • jQuery ui autocomplete没有搜索结果
  • 调用函数 - 如何简化此操作?
  • 无法通过setEntity发送POST或GET数据
  • Apache VirtualHost无法正常工作
  • php脚本强制下载xml文件
  • 添加.htaccess行来解决路由问题

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华