Skip to content

Instantly share code, notes, and snippets.

@torjusb
Created October 7, 2010 16:15
Show Gist options
  • Save torjusb/615371 to your computer and use it in GitHub Desktop.
Save torjusb/615371 to your computer and use it in GitHub Desktop.
<?$i=99;$b=" bottle";$o=" of beer";$v=" on the wall";while($i>0&&$y=$i)echo"$i$b",$y>1?"s":"","$o$v, $i$b",$y>1?"s":"","$o.
",$i>1?"Take one down and pass it around":"Go to the store and buy some more",", ",--$i?:"99",$b,$i>1||$i<1?"s":"","$o$v.
";
<?for($i=99;$i;)echo$n=$i.($b=" bottl").($i>1?es:e).$o=" of beer",$v=" on the wall",", $n.
",--$i?"Take one down and pass it around, ":"Go to the store and buy some more, ",$i?:99,$b,$i!=1?es:e,"$o$v.
";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment