PHP/JQuery/JavaScript Countdown
<p>I'm trying to use the jQuery Countdown (http://code.google.com/p/jquery-countdown/) to display a countdown to a specific date and time, but you need to program the number of days, hours, minutes, and seconds into the jQuery call. </p>

<p>I'm not quite sure how to do this in JS, but I figured using PHP to calculate the time and then having it plug those variables in would work. I found this PHP function online, but I'm unsure of the math to add a $seconds_left. Could someone please help?</p>

<pre><code>function countdown($year, $month, $day, $hour, $minute)
{
  // make a unix timestamp for the given date
  $the_countdown_date = mktime($hour, $minute, 0, $month, $day, $year, -1);

  // get current unix timestamp
  $today = time();

  $difference = $the_countdown_date - $today;
  if ($difference &lt; 0) $difference = 0;

    global $days_left;
    global $hours_left;
    global $minutes_left;

  $days_left = floor($difference/60/60/24);
  $hours_left = floor(($difference - $days_left*60*60*24)/60/60);
  $minutes_left = floor(($difference - $days_left*60*60*24 - $hours_left*60*60)/60);
}
</code></pre>

<p>Thanks!</p>
