Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $total = '229.5';
- $t = floatval($total) * floatval('0.20');
- $taxed = $total - $t;
- if ($taxed < 99) {
- print 1;
- $admin = $taxed - 10;
- $charge = 10;
- } elseif (($taxed >= 99) && ($total < 199)) {
- $admin = $taxed - 15;
- $charge = 15;
- print 2;
- } elseif ($taxed >= 199) {
- $admin = $taxed - 20;
- $charge = 20;
- print 3;
- } else {
- print "Error";
- }
- print $admin;
- print "<br />";
- print $charge;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement