I'm trying to get the total time duration of all time variables from the database. But I don't seem to get the right total or result. This is my code...
    $len = count($mids);
    foreach($mids as $key => $val)
    {
        $result=mysql_query("SELECT * FROM tbltempmovies WHERE mid='".$val."'");
        while($row=mysql_fetch_array($result))
        {
            $dur += strtotime($row['duration']);
        }
    }
    $duration = date('g:i:s', $dur);
PS: I know I'm not using mysqli or PDO. I'll fix that once I'm done with this.