Last active
April 12, 2018 15:56
-
-
Save interactiveRob/1e7495dd50155e88dc7643388b225714 to your computer and use it in GitHub Desktop.
Easy PHP check Day of Week
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 | |
$day = date('D'); | |
if($day == 'Mon' || $day == 'Wed' || $day == 'Fri'): | |
//do something | |
else: | |
endif; | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can use the PHP date() function with a capital 'D' to return an abbreviated string for today's date.
Returned Values:
Mon
Tue
Wed
Thu
Fri
Sat
Sun