# Solved: PHP > Conditional DIV display by date



## ChimpanzeeUK (Jul 31, 2007)

Hello.

I currently have a notice warning users of scheduled downtime this Sunday (between 7am and 12pm) on a PHP page. Is there a simple piece of PHP that i can wrap around it to automatically hide the notice after that time?

Thanks.


----------



## MMJ (Oct 15, 2006)

```
<?php
if (time() < mktime(12, 0, 0, 9, 9, 2007))
	echo 'some div blah, blah, blah';
?>
```


----------



## ChimpanzeeUK (Jul 31, 2007)

Thanks for that. Exactly what I was after!  

I assume that gets the time from the server and not the user's pc?


----------



## MMJ (Oct 15, 2006)

ChimpanzeeUK said:


> Thanks for that. Exactly what I was after!
> 
> I assume that gets the time from the server and not the user's pc?


np. 

Yes, thats correct.


----------



## ChimpanzeeUK (Jul 31, 2007)

Brilliant. Thanks again. :up: 

That's going straight into my library of useful code snippits!


----------

