Hi,
I'm a real beginner and I need some help with date and time, hope u can help me.
I need to echo some html in specific time range, e.g. I need to echo some html ONLY on every saturday from 2 PM - 4 PM (time have to be GMT).
Can u help me ? Thanx.
if((gmstrftime("%u")=="6") && (gmstrftime("%R")>="14:00") && (gmstrftime("%H")<="16:00")) {echo "some HTML";}
May need some tweaks. I didn't count parens. It should get you on the right track. gmstrftime returns GMT %u is numerical day of the week 6 is Sat %R is 24h time. Not sure if it's 1400 or 14:00.
Hope it helps
Originally posted by Stole Hi, I'm a real beginner and I need some help with date and time, hope u can help me. I need to echo some html in specific time range, e.g. I need to echo some html ONLY on every saturday from 2 PM - 4 PM (time have to be GMT). Can u help me ? Thanx.
This works just fine! Thank you so much!