php 秒转时分秒
2018-07-04 本文已影响0人
上帝2017
function secToTime($times){
$time = gmstrftime('%H时%M分%S秒',1);
$time = preg_replace("/00时|00分/", "",$time);
$time = preg_replace_callback("/(\d{1,})/",
function($matches) {
return intval($matches[0]);
},$time);
return $time;
}