我正在寻找一种解决方案来显示 minutes:seconds
持续时间1785.16 string android device
在 php 中它很简单:
<?php
$seconds = '1785.16';
$minutes = floor($seconds/60);
$secondsleft = $seconds%60;
if($minutes<10)
$minutes = "0" . $minutes;
if($secondsleft<10)
$secondsleft = "0" . $secondsleft;
echo "$minutes:$secondsleft";
?>
This will display: 29:45