/ Published in: PHP

Php check for the top of the hour
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?php $minutes = date('i'); // We'll go by the minutes of the hour so that we don't have to compare to all 24 possible outcomes if($minutes == '00'){ // if the minutes are 0 which should be the top of the hour echo "true"; // then pass a true to the refresh function } else{ echo "false"; // if not, pass a false } ?>
Comments
