Wish I could paste this in HTML so you could see the colors without me spending alot of time converting. However if you would like to see it go to my site here.
http://www.coastgames.com/html.php?link=11
Time difference. Days past. Timestamp in format of mm/dd/yyyy
$day=substr($timestamp, 3, 2);
$month=substr($timestamp, 0, 2);
$year=substr($timestamp, 6, 4);
// Calculations
$startday = mktime ("", "", "", $month, $day, $year); // get unix time for start date
$today = time(); // todays
$difference = $today - $startday; // work out the difference
$show = floor($difference / 86400);
Time Difference. Days to come. Timestamp in format of mm/dd/yyyy
$day=substr($timestamp, 3, 2);
$month=substr($timestamp, 0, 2);
$year=substr($timestamp, 6, 4);
// Calculations
$startday = mktime ("", "", "", $month, $day, $year); // get unix time for start date
$today = time(); // todays
$difference = $startday - $today; // work out the difference
$show = floor($difference / 86400);
--------------------------------------------------------------------------------
Lets break it down. Timestamp example 10/31/2002
$month=substr($timestamp, 0, 2); (This is taking the first 2 digits for the month.)
$day=substr($timestamp, 3, 2); (This is taking the 4th and 5th digit for the day.)
$year=substr($timestamp, 6, 4); (This is takign the 7th through 10th digits for the year.)
// Calculations
$startday = mktime ("", "", "", $month, $day, $year); // get unix time for start date
$today = time(); // todays
$difference = $startday - $today; // work out the difference
$show = floor($difference / 86400);