I want a simple PHP file to advertise store hours (9 to 5, Mon to Fri),
tell the current day, hour, time and compare the current with the open time schedule and tell if the store is open or not.
I have the first part – I am lost on comparing the times.
Obviously I am just learning PHP.
What I have is:
<p align=”center”><font size=”5″ color=”#800000″>
Welcome to our Technical Support Office</font><br><br>
<align=”center”><font size=”4″ color=”#800000″>
Our hours of operation are 8 hours a day Monday through Friday, between 9 AM and 5 PM.<br><br></font></p>
<?PHP
$today = date(‘l F d, Y’);
$time = date(‘h:i A’);
print “<p align=center><font size=4 color=#800000>”;
print ‘Today is ‘ . date(‘l F d, Y’) . ‘ and the time is ‘ . date(‘h:i A’) .’.<br><br>’;
$printclosed = print “Our office is currently closed.<br><br>”;
$printopen = print “Our office is currently open.</font>”;
?>
I want one of the last two print lines to print.
Thanks for any help.