Query Master Query Master - 2 months ago 6
PHP Question

PHP server time convert to left hours count

I have a PHP Server time like this enter image description here and I need to convert this time into left hours count like this

6 hours lefts
7 hours lefts

Answer
$time_left = floor((time() - strtotime($server_time)) / 3600);
echo $time_left.' hours left';