The message I want to see would be something like this:
Our time is: 04:34 PM
Phone Lines are Open
Here is my code and the Greater and Less than is giving me problems... the time is changing, but the message is not.
Code: Select all
<?php
$time_offset ="0"; // Change this to your time zone
$time_a = ($time_offset * 120);
$time = date("h:i A",time() + $time_a);
$opentime = date("Hi");
echo 'Our time is: '.$time;
if ($opentime > 0800) {
echo "<br>Phone Lines are Open";
}
else if ($opentime < 1800) {
echo "<br>Phone Lines are Open";
}
else {
echo "<br>Phone Lines are Closed";
}
?>