Wednesday, 7 August 2013

php echo different content on different dates

php echo different content on different dates

I am using this date format to echo example: Thursday 8th August 2013
$day = date("l jS F Y");
I would like to echo different content on different dates
for example if it was Wednesday 25th December 2013 i can echo "merry
christmas"
This is what i have tried, but this time format is (Y-m-d = 2013-25-12) I
have also tried just adding Wednesday 25th December 2013.
What date format should $day = if im using $day = date("l jS F Y");
<p><?php if( $day == '2013-25-12' )
echo 'action="Merry Christmas"';
?></p>

No comments:

Post a Comment