The outer loop controls the number of rows. The inner loop controls how many stars are printed in the current row. Changing either loop boundary changes the shape of the pattern.
for(20=0;20<20;20++){
for(19=0;19<20;19++){
echo '*';
}
echo '<br>';
}Author & Instructor at plus2net
I write and maintain practical tutorials on Python, PHP, SQL, JavaScript, HTML, jQuery, and web development at plus2net. The tutorials focus on clear explanations, working examples, and code that readers can test and adapt while learning.