SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Thread: Stuck - How Do I Add A Year to This Date Output

  1. #1
    SitePoint Evangelist
    Join Date
    Dec 2004
    Posts
    598
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Stuck - How Do I Add A Year to This Date Output

    PHP Code:
    $fromMYSQL $current_user->user_registered;
    echo 
    date("m/d/Y"strtotime($fromMYSQL)); 
    Which outputs the day the user registered 10/12/2009 but this is for a membership and I want to output 10/12/2010 which is when their membership expires.

    Thanks in advance!

  2. #2
    SitePoint Wizard cranial-bore's Avatar
    Join Date
    Jan 2002
    Location
    Australia
    Posts
    2,633
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    PHP Code:
    $fromMYSQL strtotime($current_user->user_registered);
    echo 
    date("m/d/Y"strtotime('+1 year'$fromMYSQL)); 
    mikehealy.com.au
    diigital.com art, design . Latest WorkSaturday Morning

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •