l114/h14/14.2/14.2.php
<?php
$ingevuldGetal = $_GET['bedrag'];
?>
<!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>
<form action="" method="GET">
Bedrag: <input type="text" name="bedrag">
</form>
<?php
$getal = 100;
function omrekenen($ingevuldGetal) {
$bedrag = number_format($ingevuldGetal, 2, ',' , '.');
return "€". $bedrag;
}
echo omrekenen($ingevuldGetal);
?>
</body>
</html>
Resultaat
Made by Thijs Aarnoudse