l107/14.2.php
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Hoofdstuk 14</title>
</head>
<body>
<?php
/*$getal="3000";
echo number_format($getal,2, ',' , '.');
echo "<br>";
$getal="3145.45";
echo number_format($getal, 1, ',' , '');
echo "<br>";
setlocale (LC_ALL, 'nld_NLD');
$getal="3145.45";
echo round($getal, 0);
echo "<br>";*/
$bedrag = afronden(5.7402);
echo $bedrag;
function afronden($getal){
return "Het bedrag is €" . round($getal, 2);
}
?>
</body>
</html>
Resultaat
Made by Thijs Aarnoudse