10-13-2008, 09:11 PM
|
#4 (permalink)
|
|
La Vida es Sueño
Join Date: Sep 2007
Location: Oldham
Posts: 2,280
Thanks: 90
|
It is quite simple, you'll just have to find a place in your code to insert it. I hope it helps you!
php Code:
function has_subscription_expired ($iTimestamp, $iDays = 30){ $iNadir = strtotime(sprintf('-%d days', $iDays)); if ($iTimestamp < $iNadir) { return true; } return false; }var_dump(has_subscription_expired (strtotime('-35 days'))); // truevar_dump(has_subscription_expired (strtotime('-30 days'))); // falsevar_dump(has_subscription_expired (strtotime('-25 days'))); // false
__________________
The man who comes back through the Door in the Wall will never be quite the same as the man who went out.
|
|
|