Last active
December 14, 2017 14:24
-
-
Save sajhd/fbfbe080635cd0282ce3ddc3984ebcdf to your computer and use it in GitHub Desktop.
Work on season
This file contains hidden or 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 | |
| //get current month | |
| $currentMonth = DATE("m"); | |
| echo $currentMonth; | |
| //retrieve season | |
| if ($currentMonth >= "03" && $currentMonth <="05") | |
| $season = "spring"; | |
| elseif ($currentMonth >= "06" && $currentMonth <= "08") | |
| $season = "summer"; | |
| elseif ($currentMonth >= "09" && $currentMonth <= "11") | |
| $season = "autumn"; | |
| else | |
| $season = "winter"; | |
| ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment