Add days, weeks or month to php date


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. $date = date("Y-m-d");// current date
  2.  
  3. $date = strtotime(date("Y-m-d", strtotime($date)) . " +1 day");
  4. $date = strtotime(date("Y-m-d", strtotime($date)) . " +1 week");
  5. $date = strtotime(date("Y-m-d", strtotime($date)) . " +2 week");
  6. $date = strtotime(date("Y-m-d", strtotime($date)) . " +1 month");
  7. $date = strtotime(date("Y-m-d", strtotime($date)) . " +30 days");

URL: http://www.kune-studio.com

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.