Here is my (un-whatever) try:
<?php
function descCount($num) {
for ($i = $num; $i > 0; $i--) {
$array[] = $i;
}
return $array;
}
$num = descCount(99);
array_push($num, 'no more');
foreach($num as $n) :
// Decending number
$d = $n != 0
? $n - 1
: 99;
// Last descender
$d = $d == 0
? 'no more'
: $d;
// Plural Code
$npl = $n == 1
? ''
: 's';
$dpl = $d == 1
? ''
: 's';
$secndStmnt = $n == 0
? 'Go to the store and buy some more'
: 'Take one down and pass it around';
?>
<?php echo ucfirst($n); ?> bottle<?php echo $npl; ?> of beer on the wall, <?php echo $n; ?> bottle<?php echo $npl; ?> of beer.
<?php echo $secndStmnt; ?>, <?php echo $d; ?> bottle<?php echo $dpl; ?> of beer on the wall.
<br />
<?php endforeach; ?>