:bemused: How do I make a timer script? Something like "if time = 23:00"? I've searched through the entire forum for a similar thread but couldn't find. Please help
Hi what are you tryinh to do.
you could do
$vartime = "23:00:00";
if($time = $vartime)
I'm quite new, so might be a better way to do this
You should look up the date function in the handbook. You'll find the other parameters there.
if (date ("A") == "A") echo("good morning"); else echo ("good evening")
This is interesting....what about a time/date range. For example from 9am-5pm do this......from 5pm to 10pm do this....
I've got a script on a site that, depending on the time of day, loads a sound file to say good morning, good afternoon or good evening. I'll dig it out.
$now = date("H i s"); if ($now < ("12 00 00")) {include('morning.php');} elseif ($now > ("12 00 00")& $now < ("17 00 00")) {include('afternoon.php');} elseif ($now > ("17 00 00")) {include('evening.php');}
Excellent....very very cool....