Quote:
Originally Posted by carolc
Glad I found this thread as it should get me part of the way there.
How can I show a different logo based on the date? (kind of like what Google does on holidays). So if the date = July 4th show one banner, else if the month = October show another banner, etc. I don't want to hardcode the years, though, since I'd like this code to work year after year. Is this too resource intensive?
|
I don't think an 'if' on the date would be resource-intensive. But I don't believe there's a variable that includes just the date, and you are limited in which php functions you can call in a condition (
https://www.vbulletin.com/docs/html/...n_conditionals), so you'd probably need a plugin.
Quote:
Also a general php question for those who also know C/C++/C#... does php have Case statements?
|
Yes, it's called switch.
http://us2.php.net/manual/en/control...res.switch.php