|
This example will display a different background color for each day of the week
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<?php
$today = date("w");
$bgcolor = array(
"red", "blue", "green", "yellow",
"purple", "brown", "orange"
);
?>
<body bgcolor="<?print("$bgcolor[$today]");?>">
</body>
</html>
|