![]() |
Variable value based on time of day
I have a variable that I want to change based on the time of day. For example, it would have a specific value from 12:00mn to 7:00am and another value from 7:00am to 12:00mn, and so on and so forth. How do I do this?
|
PHP Code:
|
Can this go inside the template or the PHP files? How do I get the variable from the PHP to the template? Thanks!
|
You can put it in global_start and it will be available in almost all templates.
|
<span style="text-decoration: line-through">Thanks! How do you now display this variable in the template?</span>Never mind, I used template conditionals instead. Thanks!
|
Well, if for example the code you put into global_start looked like
PHP Code:
|
I couldn't get to display it inside a script tag by using:
PHP Code:
|
nonono, just use $coolvariable inside templates. (by itself)
|
All times are GMT. The time now is 10:28 AM. |
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:
|