Page 1 of 1

Adding a year onto date()

Posted: Thu Jul 22, 2004 2:14 pm
by Joe
I was wondering how I could add a year onto my current date function which is:

Code: Select all

$date = date("F j, Y");
Its for an expiry password like the year is 2004, I want it to be 2005 stamped into the database. (the best I can explian) :O

Posted: Thu Jul 22, 2004 2:16 pm
by feyd

Code: Select all

date("F j, Y",time() + 365 * 24 * 60 * 60);
or similar

Posted: Thu Jul 22, 2004 2:17 pm
by Joe
Ahh thanks alot bud!