x110/B1.php
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<?php
function tijdbereken($dagen, $uren, $minuten, $seconden){
$secondentotaal = ($dagen * 86400) + ($uren * 3600) + ($minuten * 60) + $seconden;
return $secondentotaal;
}
$aantal_seconden = tijdbereken(2, 5, 30, 10);
echo "Het totale aantal seconden is: " . $aantal_seconden;
?>
</body>
</html>
Resultaat
Made by Thijs Aarnoudse