의 총 소요 시간을 계산한다PHP
마일 시간 당: 0시 11분 40초
총 마일 : 177
총 시간 : 34 : 25:00
다른 방법을 시도했지만 완료하지 못했습니다.
$distance = "177";
$parsetime = strtotime("00:11:40");
$otfrom_string = time();
$needed = $parstime*$distance;
$otto_string = $otfrom_string+$needed;
echo date("H:i:s",$otfrom_string)."<br />";
echo date("H:i:s",$otto_string)."<br />";
$start = $otfrom_string;
$end = $otto_string;
$elapsed = $end - $start;
echo date("H:i:s", $elapsed);
가능한 중복 사용하는 문자열을 변환하려면 [어떻게 날짜 시간 경과 시간을 찾기 위해 PHP를?] (http://stackoverflow.com/questions/2915864/php-how-to-find-the-time-since-a-date-time) –
출력은 어떻게 되나요? 또는 출력이 없으면 어떤 오류가 발생합니까? 왜 이것이 사실이라고 생각하니? – sgroves
다음 출력이 표시됩니다. 2013-05-06 14:37:17 1927-05-06 20:30:37 15:02:04 – WillieBoy