price order in restoran - PHP Online

Form of PHP Sandbox

Enter Your PHP code here for testing/debugging in the Online PHP Sandbox. As in the usual PHP files, you can also add HTML, but do not forget to add the tag <?php in the places where the PHP script should be executed.



Your result can be seen below.

Result of php executing





Full code of price order in restoran.php

  1. <?php
  2. $hamburger = 4.95;
  3. $shake = 1.95;
  4. $cola = 0.85;
  5. $price=($hamburger*2)+$shake+$cola;
  6. echo $price, '\n';
  7. $taxRate = 7.5/100;
  8. $taxAmount = $price * $taxRate + $price;
  9. echo' ';
  10. echo $taxAmount;
  11. echo' ';
  12. $tip = 12.7*(16/100);
  13. echo $tip; 
  14. echo' ';
  15. $endPrice = $taxAmount + $tip;
  16. echo $endPrice;
  17.  
  18.  
File Description
  • price order in restoran
  • PHP Code
  • 08 Apr-2020
  • 296 Bytes
You can Share it: