<?php $hour = date('H'); if($h < 8 || $h >= 20) { $css = 'background: transparent url(/assets/templates/main/images/bg_container_night.gif) no-repeat 100% 5px'; } elseif ($h >=17) { $css = 'background: transparent url(/assets/templates/main/images/bg_container_cloud.gif) no-repeat 100% 5px'; } else { $css = 'background: transparent url(/assets/templates/main/images/bg_container.gif) no-repeat 100% 5px'; } echo '<style type="text/css">'.$css.'</style>'; ?>