php compare two dates

if( strtotime( date( 'Y-m-d' ) ) > strtotime( get_option( '2013-05-10' ) ) ) { // compare current date with custom date
	echo 'date is already passed';
} else {
	echo 'date is not passed';
}

Leave a Reply

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