add some number of days to current date
Posted: Thu Jun 08, 2006 1:28 am
hi to all.........
i have small problem , please give suggestions how to implement this feature..........
problem:
am trying to add 7 days to current system date,but it is not correctly adding.
please tell where is the problem in my code.
code:
<?php
echo $today = date("Y-m-d").'<br/>';
$month = date("m"); //06
$year = date("Y"); //2006
$day = date("d"); //08
echo $day = $day + 7 .'<br/>';
echo date ("Y-m-d", mktime ($year,$month,$day));
?>
i have small problem , please give suggestions how to implement this feature..........
problem:
am trying to add 7 days to current system date,but it is not correctly adding.
please tell where is the problem in my code.
code:
<?php
echo $today = date("Y-m-d").'<br/>';
$month = date("m"); //06
$year = date("Y"); //2006
$day = date("d"); //08
echo $day = $day + 7 .'<br/>';
echo date ("Y-m-d", mktime ($year,$month,$day));
?>