I don't see any scripts that count up.. mostly i see countdown
Any one has the code for count up?
Each day + 1
countup
Moderator: General Moderators
- Saethyr
- Forum Contributor
- Posts: 182
- Joined: Thu Sep 25, 2003 9:21 am
- Location: Wichita, Kansas USA
- Contact:
This Should get you close. There are probably much easier ways but I wrote this in a hurry and it seems to qwork, this is good to 2 decimal places.
Saethyr
Code: Select all
<?php
$StartDate = mktime(0,0,0,12,18,2003); //mktime(hour, minute, second, month, day, year)
$DateToday = mktime(date("h, i, s, m, d, Y"));//todays date
$dateDiff = $DateToday - $StartDate;
$NumDays = round($dateDiff/60/60/24, 2);
echo 'Difference in days: ' . $NumDays . '<br />';
?>