Learn to build secure applications from the mindset of the hacker and avoid being exploited.
Experts Exchange Solution brought to you by
"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.
$one_day = 60*60*24;
$rest_of_day = $one_day - (time() + date('Z')) % $one_day;
echo gmdate('G \h\o\u\r\s i \m\i\n\u\t\e\s \a\n\d s \s\e\c\o\n\d\s',$rest_of_day);
Experts Exchange Solution brought to you by
Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.
Start your 7-day free trialFrom novice to tech pro — start learning today.
Experts Exchange Solution brought to you by
<?php
$now = date("Y-m-d");
$tomorrow = strtotime("$now +1 day");
$timeLeft = $tomorrow - time();
echo date("H \h\o\u\\r\s i \m\i\\n\u\\t\e\s s \s\e\c\o\\n\d\s",$timeLeft
?>
The escaping is to stop the date function interpreting the text as directives.