How can this be done? Fairly simple I think

Discussion in 'PHP' started by mjwoodi, Dec 21, 2008.

  1. #1
    Hi,

    My PHP knowledge is very very limited, and I wanted to add a dynamic last update date to my landing page.

    How can I make it say, Last Updated: 19th December 2008

    I want the date to be 2 days behind the current date

    Is it possible?

    THanks
     
    mjwoodi, Dec 21, 2008 IP
  2. lp1051

    lp1051 Well-Known Member

    Messages:
    163
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    108
    #2
    Hi,
    if it's just about to have the last update date 2days behind the current day, you can use :

    echo date("dS F Y", strtotime("-2days"));
     
    lp1051, Dec 21, 2008 IP