PHP Date (don't display after certain date)

Associate
Joined
2 Aug 2005
Posts
680
Hi,

I'm trying to get my head around this but I don't know the format. Basically I want a div to change after a certain date (1st July 2007). Would it be something like this?

Code:
<?php 

if (date("Y") < '2007' && date('M') < '07' && date("D") < '1') {
print "text still counting down";}

else { print "text past deadline" ;}

?>

Thanks
 
Back
Top Bottom