I want to have a countdown to a unix timestamp: Where it counts down in seconds
Like this:
Expires in: 1d 10h 52m 25s
Heres an example timestamp: 1303725600
How could I do that?
I think this would work...
$tDiff = 1303725600 - time();
$days = floor($tDiff / 86400);
$hours = ($tDiff / 3600) % 24;
$mins = ($tDiff / 60) % 60;
$secs = ($tDiff) % 60;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With