Advertisement
Different55

Beers on a wall with php

Apr 8th, 2012
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.48 KB | None | 0 0
  1. $beers = 99;
  2. while ($beers > 0) {
  3.    echo $beers." bottles of beer on the wall, ".$beers." bottles of beer.<br />";
  4.    $beers = $beers-1;
  5.    echo "Take one down and pass it around, ".$beers." bottles of beer on the wall.<br /><br />";
  6. }
  7. echo "No more bottles of beer on the wall, no more bottles of beer.<br />
  8. Go to the store and buy some more, 99 bottles of beer on the wall.<br />";
  9.  
  10. // NOTE: The code in this paste does not reflect the nonexistant drinking habits of the coder.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement