|
Posted by Peppermint on 11/30/06 20:35
ZeldorBlat wrote:
> Peppermint wrote:
>> Hi - total newb here. But then you'd figure that out by the easy problem
>> I have:
>> I have a CMS that lets me insert PHP code, and I want to display a
>> message until a certain time, for example:
>> if the current date/time is before Dec 6, 2006, 21:30:00 :
>> <p>Come see our show Dec. 6 at 9:30 PM at the Palace!</p>
>> else:
>> <p>Check here for the next show!</p>
>> Thanks!
>
> <?php if(time() < strtotime('Dec 6, 2006, 21:30:00')) { ?>
> <p>Come see our show Dec. 6 at 9:30 PM at the Palace!</p>
> <?php } else { ?>
> <p>Check here for the next show!</p>
> <?php } ?>
>
works great! except I had to put it as:
strtotime('Dec 6 2006 21:30:00')
it didn't like the commas, I guess.
Navigation:
[Reply to this message]
|