How to Add Days to Date in PHP


Are you want to add days to date? Here is the solution to add days to the current date or desired date using PHP.

Add days to date

The following source code will add 5 days to date.
Source:

<?php
    $date 
"2015-11-17";
    echo 
date('Y-m-d'strtotime($date' + 5 days'));
?>

Result:

2015-11-22

Add days to current date

The following source code will add 5 days to current date.

<?php echo date('Y-m-d'strtotime(' + 5 days')); ?>

1 Comment

  1. Anuj Said...

Leave a reply

Connect With CodexWorld