function MinSecs($time){
$time=filter_var("$time",FILTER_SANITIZE_NUMBER_INT);
$Seconds = $time % 60; // Seconds is the remainder when divided by 60
$Minutes = floor($time / 60); // Minutes is the total time divided by 60, rounded down
$arr = [$Minutes, $Seconds]; // Return minutes first, then seconds
return $arr;
}
print_r(MinSecs($argv[1]));
?>
No hay comentarios:
Publicar un comentario