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