PHP day's countdown ?

Discussion in 'PHP' started by Mackos, Sep 9, 2010.

  1. #1
    Hello!
    I'm making script where users will be able to buy premium account for 30 days.
    But I don't know how to set date (+30 day's form now) ??
     
    Mackos, Sep 9, 2010 IP
  2. Eager2Seo

    Eager2Seo Member

    Messages:
    72
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    48
    #2
    <?php
    $month_30 = mktime(0, 0, 0, date("m") +1 , date("d"), date("y"));
    echo "One month from now ".date("m/d/y", $month_30); 
    ?>
    Code (markup):
    (of course, you can play with this to add 10 days, 2 years, etc. Its pretty self explanatory!)
     
    Eager2Seo, Sep 9, 2010 IP
  3. Mackos

    Mackos Well-Known Member

    Messages:
    364
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    130
    #3
    Thanks!
    Working perfectly ;)
     
    Mackos, Sep 9, 2010 IP
  4. danx10

    danx10 Peon

    Messages:
    1,179
    Likes Received:
    44
    Best Answers:
    2
    Trophy Points:
    0
    #4
    echo date('m/d/y', strtotime('+30 days')); 
    PHP:
     
    danx10, Sep 10, 2010 IP