• 30-03-2019, 21:24:01
    #1
    Ustalar mysqlde time olarak tutulan alandan gelen 08:30 gibi değerleri nasıl toplarım 08:30+08:30=17:00:00 olacak şekilde
  • 30-03-2019, 21:26:39
    #2
    Kimlik doğrulama veya yönetimden onay bekliyor.
    <?
    $saat1 = "00:40:06";  
    $saat2 = strtotime("00:10:20") ;
    list($saat,$dakika,$saniye) = explode(':', $saat1);  
    echo date("G:i:s", $saat2+ ($saat*3600)+ ($dakika*60)+ $saniye)
    ?>
  • 30-03-2019, 21:27:15
    #3
    mktime () ile zaman damgasına dönüştürüp toplatıp date() ile gösterebilirsin.
  • 30-03-2019, 21:42:14
    #4
    Aşağıdaki Şekilde çözdüm
    $times = array();
    
    $times[] = "12:59";
    $times[] = "0:58";
    $times[] = "0:02";
    
    // pass the array to the function
    echo AddPlayTime($times);
    
    function AddPlayTime($times) {
        $minutes = 0; //declare minutes either it gives Notice: Undefined variable
        // loop throught all the times
        foreach ($times as $time) {
            list($hour, $minute) = explode(':', $time);
            $minutes += $hour * 60;
            $minutes += $minute;
        }
    
        $hours = floor($minutes / 60);
        $minutes -= $hours * 60;
    
        // returns the time already formatted
        return sprintf('%02d:%02d', $hours, $minutes);
    }