note 99730 deleted from function.time by danbrown

From: Date: Wed, 01 Sep 2010 19:34:52 +0000
Subject: note 99730 deleted from function.time by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-172253@lists.php.net to get a copy of this message
Note Submitter: Matt D. ---- The below will return to you the count of [units] that have passed since the start of the count. This is useful if you are looking to do date-based entries to a table (ie set the db key to have values that will match here)... echo time()." seconds have passed<br>"; $min = (time() - (time() % 60)) / 60; echo $min." minutes have passed<br>"; $hour = ($min - ($min % 60)) / 60; echo $hour." hours have passed<br>"; $day = ($hour - ($hour % 24)) / 24; echo $day." days have passed<br>";

« previous php.notes (#172253) next »