你好,我正在寻找 %。首先我找到了秒
$tm=sum_the_time($d_duration);
$d_seconds='0';
list($hour,$minute,$second) = explode(':', $tm);
$d_seconds += $hour*3600;
$d_seconds += $minute*60;
$d_seconds += $second;
$total_second=$c_seconds+$p_seconds+$t_seconds+$b_seconds+$d_seconds;
$c_seconds=$c_seconds*100/$total_second;
$p_seconds=$p_seconds*100/$total_second;
$t_seconds=$t_seconds*100/$total_second;
$b_seconds=$b_seconds*100/$total_second;
$d_seconds=$d_seconds*100/$total_second;
echo $c_seconds;
结果是 10.754504504505,我将如何像 10.7 一样打印此代码