Created
June 29, 2016 18:20
-
-
Save yozzi/be4c7e930d1242cc0272010fb9e3ba27 to your computer and use it in GitHub Desktop.
Rotate an image every 3 days
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
date_default_timezone_set('America/New_York'); | |
$dayOfTheYear = date('z'); | |
$iterationCount = ceil($dayOfTheYear / 3); | |
$numberForIteration = $iterationCount % 8; | |
echo '<img alt="" src="'.$numberForIteration.'.jpg" />'; | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment