$rows=5;
for($i=$rows;$i>=1;$i--){
for($j=1;$j<=$i;$j++){
echo $j;
}
echo "\n";
Output
1 2 3 4 5
1 2 3 4
1 2 3
1 2
1
Coderraj is the global online platform and circle for programmers to learn, communicate, share their knowledge and growth their careers.
Copyright ©2022 coderraj.com. All Rights Reserved.