首页 > 解决方案 > 如果今天在月 10 日、月 15 日、月 20 日之前

问题描述

如果当前日期在本月的某一天之前,我只想将不同的类应用于元素。随着月份的进展,我想逐步提高知名度以显示紧迫性。

if today <= 10th of the current month
else if today <= 15th of the current month
else if today <= 20th of the current month

标签: phphtml

解决方案


试试这个:

 $dayOfMonth = date("d");  
 if($dayOfMonth <=10){

 }...

推荐阅读