How to add days to the current date in PHP? PHP adding days to the current date is very easy and follows this article. I will guide you to add days to the current date using PHP. 

PHP add days to current date samples:

Add 1 day to the current date:

<?php
  $result = date('d.m.Y', strtotime('+1 day', time()));

  echo "Result: ".$result;
?>

Result

### Current date: 28.03.2022

Result: 29.03.2022

Add 2 days to the current date:

<?php
  $result = date('d.m.Y', strtotime('+2 day', time()));

  echo $result;
?>

Result

### Current date: 28.03.2022

Result: 30.03.2022

Add 5 days to the current date:

<?php
  $result = date('d.m.Y', strtotime('+5 day', time()));

  echo $result;
?>

Result

### Current date: 28.03.2022

Result: 02.04.2022

Add 7 days to the current date:

<?php
  $result = date('d.m.Y', strtotime('+7 day', time()));

  echo $result;
?>

Result

### Current date: 28.03.2022

Result: 04.04.2022

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

Sign In

Register

Reset Password

Please enter your username or email address, you will receive a link to create a new password via email.