Created
July 5, 2018 04:11
-
-
Save hashimwarren/4638dcbdde3c4349b69b3becd70be0e5 to your computer and use it in GitHub Desktop.
Function for creating a holiday greeting
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 | |
date_default_timezone_set("America/New_York"); | |
function seasonsGreetings($dateCheck, $greeting) { | |
$dateNumber = date("md"); | |
if($dateNumber = $dateCheck) { | |
echo $greeting; | |
} else { | |
echo "Good day!"; | |
} | |
} | |
seasonsGreetings("0704", "Happy 4th of July"); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment