php - 如果今天在月 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
解决方案
试试这个:
$dayOfMonth = date("d");
if($dayOfMonth <=10){
}...
推荐阅读
- asp.net - 如何在 C# 中停止前一个间隔并启动新的间隔计时器
- git - 使用 egit 变基
- xpages - Xpages 设计元素,托管 bean 限制
- javascript - 有没有办法在段落中的字符之间添加制表符?
- c - 我可以在编译时使用 gcc 扩展强制显式初始化数组大小吗?
- c# - 无法在 Windows 7 和 8.1 上使用 C++ 库运行 Winforms 应用程序
- homebrew - Brew 不会在 Mojave 上升级
- python - 记录 INFO 时如何让龙卷风打印出日期时间?
- angular-material2 - 获取角度 6、角度材料 2 中选定 mat-option mat-select 的文本/html 值
- python - 为什么不能修改 Class 的 Tkinter Button 配置?