<?php
<?php
// Gegeven: de prijs inclusief btw komt uit de database
$totaal = 49;
// Artikelprijs exclusief btw berekenen:
$prijs_exclusief_btw = round($totaal / 1.21, 2);
// Dan is de btw:
$btw = $totaal - $prijs_exclusief_btw;
// Hierna pas de getallen omzetten in strings:
$prijs_exclusief_btw = number_format($prijs_exclusief_btw, 2, ',', '.');
$btw = number_format($btw, 2, ',', '.');
$totaal = number_format($totaal, 2, ',', '.');
echo '<pre>';
var_dump($prijs_exclusief_btw, $btw, $totaal);
- Output for 5.3.0 - 5.3.28, 5.4.0 - 5.4.30
- Parse error: syntax error, unexpected '<' in /in/RA9Rj on line 2
Process exited with code 255.
preferences:
192.39 ms | 1395 KiB | 67 Q