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
    Regular Coder UrbanTwitch's Avatar
    Join Date
    Apr 2006
    Posts
    485
    Thanks
    44
    Thanked 1 Time in 1 Post

    PHP Days/Minutes/Secs Ago

    I want a script where it tells the days, minutes, and or seconds of some a time.

    I already tried PHPmanual and Google so yeah...
    Formerly MysticScript

    6+ years club

  • #2
    Regular Coder
    Join Date
    May 2008
    Location
    Ohio
    Posts
    231
    Thanks
    3
    Thanked 21 Times in 21 Posts
    PHP Code:
    <?php
        
    echo date('Y-m-d H:i:s',time());
    ?>
    If you want to use the current time use time() as the second parameter OR omit the second parameter entirely. Otherwise you can use any unix timestamp as the value of the second parameter and it'll work.
    zok@zoklet:~$ whereis zok
    zok: http://zoklet.net | http://zoklet.net/otg | /derzok/at/gmail/dot/com


  •  

    Posting Permissions

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