Right now, we are...

Closed "; // Specify the html code you want to pass the browser if you are closed $openHTML = "

Open

"; // Specify the html code you want to pass the browser if you are open if ((in_array(date("l", $timestamp), $closedDays)) || // Is the current day of the week one of the closed days? ($timestamp < strtotime($openTime)) || // Or is the current time before the open time? ($timestamp >= strtotime($closeTime))) { // Or is the current time after the close time? return $closedHTML; // Then we're closed, sorry dude } else { return $openHTML; // It's not a closed day, or before opening, or after closing, so we must be open! } } //Pass the openOrClosed function the time and ask if they are open: echo openOrClosed(time()); ?>

... Because it is