How can I calculate the total travel time in PHP:
Per mile Duration: 00:11:40
Total miles: 177
Total duration: 34:25:00
I've tried different ways, but can not get it done.
$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);