Return to Snippet

Revision: 41688
at February 22, 2011 13:23 by sedgemonkey


Initial Code
//Show content based on the day
if ($ts > mktime(0,0,0,5,7,2010)) {
	//5/7/2010
	echo "It's May 5th or later!";
} else if ($ts > mktime(0,0,0,4,26,2010)) {
	//4/26/2010
	echo "It's between April 26 and May 5!";
} else {
	echo "It's earlier than 4/26!";
}

Initial URL


Initial Description


Initial Title
PHP Date Switch

Initial Tags
php, date

Initial Language
PHP