➤ Alphabet triangle pattern using range() function
$alpha = range('A', 'Z');  
for( $i = 0; $i < 10; $i++ ) {   
  for( $k = 10; $k > $i ; $k-- ){  
    echo $alpha[$i];  
    }  
    echo "\n";  
}  
Outputs :
AAAAAAAAAA
BBBBBBBBB
CCCCCCCC
DDDDDDD
EEEEEE
FFFFF
GGGG
HHH
II
J
by Levani Makhareishvili
2 years ago
PHP
1
Pro tip: use ```triple backticks around text``` to write in code fences