Re: Date problems

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Mace Eliason wrote:
Hi,

I am having troubles adding 7 days to the current date. I have been reading through php.net date() and this is what I have come up with but it doesn't work
$today = date('m/d/Y');
$nextweek = date('m/d/Y',mktime(date("m"), date("d")+7, date("Y")));

if I echo the above variables they are the same? Shouldn't the $nextweek be different?

You are thinking too much!  ;)

$nextweek = date("m/d/Y",strtotime("+7 days"));

-Rasmus

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux