Answer the question
In order to leave comments, you need to log in
How to correctly count the time from the given one?
hello! I have a question, I went through the ways, I can’t figure out how to display the time of the form: “24 hours left”, and not a dry date, while these 24 hours decrease to 0. Please help, I will be grateful.
$ddel = time() + 60*60*24;
$dadd = time();
$db->Query("SELECT COUNT(*) FROM db_bonus_list WHERE user_id = '$usid' AND date_del > '$dadd'");
<center><b style="color: rgb(160, 178, 178);">До след бонуса осталось: <?=date($data_bonus["date_del"],"H:i:s") ;?> </b></center>
Answer the question
In order to leave comments, you need to log in
You can't do this in php. This is done in javascript and jquery. It's better to use a plugin.
postovoy.net/33.html
$ddel you store somewhere.
.................
.................
$h = $ddel - $dadd;
echo 'До след бонуса осталось:' . ceil($h/3600);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question