Possible Duplicate:
How to calculate the difference between two dates using PHP?
Let's say I have given date like this :
$Christmas = '2012-12-25';
$Today = date('Y-m-d');
I want to create an if
statement like this :
if ($Today != 7 days before $Christmas) {
echo 'Christmas still to far away';
}else ($Today == 7 days before $Christmas) {
echo 'Christmas will be here within less than a week!';
}
How to create validation date such like that? thanks.