Err, yeah, I just figured that out. So now I have this, but it always
matches the first. I even tried setting $now = "2221"
Thanks for the help!
Bryan
<?
$now = date("Hi", strtotime("now"));
$out = "not set";
if (ereg("[2200-2230]", $now))
$out = "special";
elseif (ereg("[0600-1159]", $now))
$out = "morning";
elseif (ereg("[1200-1659]", $now))
$out = "afternoon";
elseif (ereg("[1700-1959]", $now))
$out = "evening";
elseif (ereg("[2000-0000]", $now))
$out = "night";
elseif (ereg("[0001-0559]", $now))
$out = "too late";
else
$out = "no matches";
echo "$now\n";
echo "$out\n";
?>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php