How can we find out how many time remains to end the current day from current time[date('Y-m-d H:i:s')] in PHP.
For example with a combination of mktime() and time():
$left = mktime(23,59,59) - time() +1; // +1 adds the one second left to 00:00
Update:
From Simon's suggestion, mktime(24,0,0) works too:
$left = mktime(24,0,0) - time();
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