Jump to content

Adding a number of days to a date


elentz

Recommended Posts


$date = date('Y-m-d', strtotime("+10 days"));

 

EDIT:

 

If you want to add days to a specific date, then you can do this

 

<?php

$date = strtotime("2007-11-14");
$date = date('Y-m-d', strtotime("10 day", $date));
echo $date;

?>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.