Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    kjc
    kjc is offline
    New Coder
    Join Date
    Jun 2002
    Location
    England
    Posts
    56
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Getting number of days for last month

    Does anyone know how to get the number of days for the last month?

    using th date function i can get days for this month
    date("t");

    Any ideas

    Kjc

  • #2
    Regular Coder
    Join Date
    Jul 2002
    Location
    London, UK
    Posts
    126
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Think this should do the trick:
    PHP Code:
    print date("t"mktime(0,0,0date("n") - 1)); 
    Worth testing though..


  •  

    Posting Permissions

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