hey,
how would you go about making a php script that does a certain thing if the times is between 2am and 3am?
all help appreciated
hey,
how would you go about making a php script that does a certain thing if the times is between 2am and 3am?
all help appreciated
Date will return the hour if you use the right format.
http://www.php.net/manual/en/function.date.php
Or, if you need a bigger timeframe:PHP Code:<?php
$h = date('G');
if ($h==2) {
dostuff();
}
?>
if ($h>2&&$h<12)
etc.
Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum
Bookmarks