function time2strclock($time)
{
        $time = floor($time);
        if (!$time)
                return "00:00:00";
        $str["hour"] = $str["min"] = $str["sec"] = "00";
        $h = $time/3600;
        $h = floor($h);
        if ($h){
                if ($h < 10)
                        $h = "0" . $h;
                $str["hour"] = "$h";
                $time = $time % 3600;
        }
        $m = $time/60;
        $m = floor($m);
        if ($m){
                if ($m < 10)
                        $m = "0" . $m;
                $str["min"] = "$m";
                $time = $time % 60;
        }
        if ($time){
                if ($time < 10)
                        $time = "0" . $time;
        }
        else
                $time = "00";
        $str["sec"] = "$time";
        $ret = "$str[hour]:$str[min]:$str[sec]";
        return $ret;
}

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • blinkbits
  • BlinkList
  • blogmarks
  • co.mments
  • del.icio.us
  • De.lirio.us
  • digg
  • Fark
  • feedmelinks
  • Furl
  • LinkaGoGo
  • Ma.gnolia
  • NewsVine
  • Reddit
  • scuttle
  • Smarking
  • Spurl
  • YahooMyWeb
  • DZone
  • Internetmedia
  • Snap2r
  • Technorati

Letto:553 volte

Correlati

    No related posts

Leave a Reply

web tracker