Advertisement
Phr0zen_Penguin

99 Bottles of Beer

Dec 24th, 2013
191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.35 KB | None | 0 0
  1. <?php
  2. /*============================================================================
  3.   ----------------------------------------------------------------------------
  4.   99_bottles.php - 99 Bottles Of Beer Lyrics.
  5.         (c) Damion 'Phr0z3n.dev' Tapper, 2013.
  6.         Email: Phr0z3n.Dev@Gmail.com
  7.   ----------------------------------------------------------------------------
  8.   ============================================================================*/
  9. ?>
  10.  
  11. <?php
  12.     echo ">>------------------> 99 Bottles Of Beer Lyrics <------------------<< <BR><BR>";
  13.  
  14.         for($bottles_of_beer = 99; $bottles_of_beer > 0; $bottles_of_beer--)
  15.         {
  16.             echo "$bottles_of_beer bottle";
  17.  
  18.                 if($bottles_of_beer != 1)
  19.                     echo "s";
  20.  
  21.             echo " of beer on the wall, $bottles_of_beer bottle";
  22.  
  23.                 if($bottles_of_beer != 1)
  24.                     echo "s";
  25.  
  26.             echo " of beer.<BR>";
  27.             echo "Take one down and pass it around, ";
  28.  
  29.                 if(($bottles_of_beer - 1) != 0)
  30.                     echo $bottles_of_beer - 1;
  31.                 else
  32.                     echo "no more";
  33.  
  34.             echo " bottle";
  35.  
  36.                 if(($bottles_of_beer - 1) != 1)
  37.                     echo "s";
  38.  
  39.             echo " of beer on the wall.<BR><BR>";
  40.         }
  41.  
  42.     echo "No more bottles of beer on the wall, no more bottles of beer.<BR>";
  43.     echo "Go to the store and buy some more, 99 bottles of beer on the wall.<BR><BR>";
  44.  
  45.     echo ">>-------------------------------> + <-------------------------------<<";
  46. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement