Advertisement
Guest User

Untitled

a guest
Sep 22nd, 2016
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.66 KB | None | 0 0
  1. <?php
  2.  
  3. # This file is used to teach the very basics of conditionals.
  4.  
  5. $bank_balance = "5751";
  6.  
  7. # we wil lbe changing the value below and see how our condition changes:
  8.  
  9. $withdrawal_amount = "5751";
  10.  
  11. echo "<p>Your bank balance is: $bank_balance</p>";
  12. echo "<p>The amount you want to withdrawal is: $withdrawal_amount</p>";
  13.  
  14.  
  15. if ($bank_balance > $withdrawal_amount) {
  16.  
  17.     echo "You have enough money to make this withdrawl";
  18.  
  19. } elseif ($bank_balance < $withdrawal_amount) {
  20.  
  21.     echo "You don't have enough to make this withdrawal!";
  22.  
  23. } elseif ($bank_balance == $withdrawal_amount) {
  24.  
  25.     echo "You want to ake out ALL your money?! ok....";
  26.  
  27. }
  28.  
  29.  
  30. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement