Php countdown script
<p>I'am trying to make a countdown script using PHP. I have successfully made the first part, where I count down from 72. What's causing me trouble is to find out how to count down in minutes when <code>$hours &lt; 1</code>.</p>

<p>Code:</p>

<pre><code>date_default_timezone_set('Europe/Copenhagen');
$connect = mysql_connect('localhost', 'root', '');
$db = mysql_select_db('time');

$sql = "SELECT time FROM timeanddate";

$qry = mysql_query($sql);
$row = mysql_fetch_assoc($qry);


$start_time = date("H:i:s", strtotime($row['time']));

$current_time = date("H:i:s");

function dateDiff($start, $end) {

 $start_ts = strtotime($start);

 $end_ts = strtotime($end);

 $diff = $end_ts - $start_ts;

 return round($diff / 3600);

}

$count = dateDiff($row['time'], $current_time);

$hours = 72;

$hours_left = $hours - $count;

echo $hours_left . " Hours back &lt;br /&gt;";
</code></pre>
