Show content between time ranges

<?php $theDate = date("H:i"); // Show hours and minutes H:i:s Hours Minutes and seconds $date = new DateTime( $theDate ); $date->setTimezone(new DateTimeZone('America/New_York')); echo $date->format('H:i'); ?> <?php if(( $theDate >= '04:23' ) && ( $theDate <= '04:25' )) : ?> show dj <?php elseif(( $theDate >= '04:32' ) && ( $theDate <= '04:34' )): ?> Show Other DJ <?php elseif(( $theDate >= '04:35' ) && ( $theDate <= '04:37' )): ?> Show Other Other DJ <?php else: ?> No DJs <?php endif ?>

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.