为什么我没有得到正确的输出。(php)

<?php
$count='a';
for($i=1;$i<=6;$i++)
{
    for($j=1;$j<=(7-$i);$j++)
    {
        echo $count--;      
    }
    echo "<br/>";
    } 
?>

count++ is working correctly if i set count='a'. but count-- is not working. what is the reason for it.

Quoting from the friendly manual

PHP follows Perl's convention when dealing with arithmetic operations on character variables and not C's. For example, in PHP and Perl $a = 'Z'; $a++; turns $a into 'AA', while in C a = 'Z'; a++; turns a into '[' (ASCII value of 'Z' is 90, ASCII value of '[' is 91). Note that character variables can be incremented but not decremented and even so only plain ASCII alphabets and digits (a-z, A-Z and 0-9) are supported. Incrementing/decrementing other character variables has no effect, the original string is unchanged.

(my emphasis)

Try this:

$count='a';
for($i=1;$i<=6;$i++)
{
for($j=1;$j<=(7-$i);$j++)
{
    charMinus($count);
    echo $count;
}
echo "<br/>";
}

function charMinus(&$char) {
    $ascii=ord($char);
    $ascii==97 ? $ascii=123;
    $char=chr($ascii-1);
}