SyntaxFix
Write A Post
Hire A Developer
Questions
If you're using PHP 5.5 or PHP 7 above, you may want to use:
function isTodayWeekend() { return in_array(date("l"), ["Saturday", "Sunday"]); }
and it will return "true" if today is weekend and "false" if not.