aWebDeveloper
aWebDeveloper

Reputation: 38332

Getting time in seconds

<?php 

    $target = mktime(0, 0, 0, 10, 25, 2010) ;
    $today = time () ;
    $difference =($target-$today) ;
    echo $output = $difference/60 ;

?>

will the above code give time in seconds

Upvotes: 0

Views: 89

Answers (1)

Mads Lee Jensen
Mads Lee Jensen

Reputation: 4648

No it will give in minutes :) remove the "/60";

Upvotes: 4

Related Questions