Jump to content

[SOLVED] A simple time script


maxso

Recommended Posts

You would have to encapsulate it in quotes if it will work or else syntax error.

 

Here is my version that should work with what you want:

 

<?php
$time1 = strtotime('4:00 PM');
$time2 = strtotime('4:30 PM');
$newtime = time();

if ($time1 < $newtime && $time2 > $newtime) {
    include('script.php');
}
?>

 

Unsure if the strtotime will return right, but yea.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.