php help

Discussion in 'PHP' started by kumar84, Jul 7, 2007.

  1. #1
    hai

    If i use time() function means it showing time in seconds like


    1183792602


    with the help of same time() function i want to display the time in the format of hh:mm:ss


    so that what i want to do in php
     
    kumar84, Jul 7, 2007 IP
  2. nico_swd

    nico_swd Prominent Member

    Messages:
    4,153
    Likes Received:
    344
    Best Answers:
    18
    Trophy Points:
    375
    #2
    Have a look at date(), and the first table for the date formats.

    Also, you don't need time() in this case, if you want to show the current date.
     
    nico_swd, Jul 7, 2007 IP
  3. tamilsoft

    tamilsoft Banned

    Messages:
    1,155
    Likes Received:
    78
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Hi,
    Use this
    date("h:i:s",time())
    PHP:
     
    tamilsoft, Jul 7, 2007 IP