![]() |
Php question
I have this If statement
<!-- IF active_module == "homepage" --> show image here <!-- ENDIF --> I only want to use this IF statement on monday - thursday. on friday-sunday I do not want to use the IF statement, so it just shows the image on every page, not just the homepage. How can I make it so that the IF statement only runs monday through thursday, and on friday-sunday it doesnt use the IF? |
Quote:
That will check if the day of the week is between Monday (1) and Thursday (4) |
thank you!
I know zero about php, do I have to put a <?php> in front of it? im fixing a template i bought |
<?php if(date('w',time())>=1 && date('w',time())<=4) {?>
Your template code here <?php } ?> should work. Let me know how it goes |
It worked!!!!
you rock, thank you so much!!! |
Quote:
|
Quote:
<? if(date('w')>=1 && date('w')<=4) {?> time() is redundant |
Quote:
Dangers of answering off the top of my head while I am breaking from code. |
All times are GMT -7. The time now is 08:59 PM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123