How to add days in the current date in PHP?

If you want to add days in current date then simply get a date in PHP with the date(); function, The date() function formats a local date and time, and returns the formatted date string.


date(format, timestamp)
// PHP program to add days to $Date 
// Declare a date 
$Date = "2019-05-10"; 
// Add days to date and display it 
echo date('Y-m-d', strtotime($Date. ' + 10 days')); 




Related Articles

One Comment

Leave a Reply

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

Back to top button

Adblock Detected

Please consider supporting us by disabling your ad blocker