Working with dates

We need to find out how many seconds, minutes, hours, daysare left before the $metka variable

To display, for example: 10 days 5 hours 24 minutes 5 seconds

$metka= mktime(19, 0, 0 ,5 , 11, 2012);
$day=time();

Answer 1, authority 100%

Everything is much simpler))).

$metka = DateTime::createFromFormat('d.m.Y G:i:s','11.05.2012 19:00:00');
$now = new DateTime;
$diff = $now->diff($metka);
echo $diff->format(' %a  %h  %i  %s ');

Answer 2, authority 50%

function getTimeLeft($point, $format = '#d , #h, , #m , #s ') {
  $left_tstamp = $point - time();
  $left = array();
  $left['d'] = floor($left_tstamp / 86400);
  $left_tstamp -= $left['d'] * 86400;
  $left['h'] = floor($left_tstamp / 3600);
  $left_tstamp -= $left['h'] * 3600;
  $left['m'] = floor($left_tstamp / 60);
  $left_tstamp -= $left['m'] * 60;
  $left['s'] = $left_tstamp;
  $result = $format;
  foreach($left as $c => $v)
    $result = str_replace('#'.$c, $v, $result);
  return $result;
  }

Something like that. Should work.