12-13-2007, 07:57 PM
|
#3 (permalink)
|
|
The Wanderer
Join Date: Dec 2007
Posts: 7
Thanks: 2
|
This is how I modified your code to work:
PHP Code:
$first = 1195958278;
$last = mktime(0, 0, 0, date("m", $first) , date("d", $first)+90, date("Y", $first));
$today = mktime(0, 0, 0, date("m") , date("d"), date("Y"));
$remaining = floor(($last - $today)/86400);
echo remaining;
$remaining will be your days left. You may have to switch the floor() function to ceil()... I didn't figure out the real difference in the dates but this script shows 71 days remaining. Tell me if this is wrong and I'll fix it up for you.
|
|
|
|