Time Help

Discussion in 'PHP' started by Marty Rogers, Nov 29, 2007.

  1. #1
    Hey Guys!

    I'm using the following code to get the current time in php:

    <?php

    $time = time();

    ?>

    The output is just lots of numbers like so '1196348581' so how do i change the output layout to something like 15:04:22 (hours, minutes, seconds)?

    Thanks :)
     
    Marty Rogers, Nov 29, 2007 IP
  2. Kwaku

    Kwaku Well-Known Member

    Messages:
    1,217
    Likes Received:
    45
    Best Answers:
    0
    Trophy Points:
    140
  3. Marty Rogers

    Marty Rogers Guest

    Messages:
    596
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Very quick reply, thanks alot =]
     
    Marty Rogers, Nov 29, 2007 IP