![]() |
Day conditonal in PHP?
Is there a way to compare today's date to a set variable in a template? Like using an If condition? I know what I'm trying to ask but it doesn't want to come out right to make sense. I want to compare this variable ($localdate) which has already been set, to whatever today's date is (not time) but I would like to do it in the template, if possible. Can it be done in the template?
|
You would have to create if first and stroe that result in a variable:
PHP Code:
Afterwards to can compare the variable in templates to whatever you want. However, you should not do that - IMHO. The better way would be to just set a $show flag and check that in templates. |
All times are GMT. The time now is 08:40 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|