$rows=5;
for($i=1;$i<=$rows;$i++){
for($j=1;$j<=$i;$j++){
echo $j;
}
echo "\n";
Output
1
1 2
1 2 3
1 2 3 4
1 2 3 4 5
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.