PHP Tutorial : Special Date Script

Today is the last day of the year 2008 and I will write a script to show your visitors a “happy new year” message automatically on tomorrow if you cannot manually add it in that day because of the traveling and other reasons.

<?php
$day = date("d");
$month = date("m");

if($day == "01" &amp;&amp; $month == "01")  {
print "Happy new year";
}
?
This entry was posted in Usefull PHP and tagged , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>