Nested Loop in PHP Means Loop inside Loop
// Print 1 to 100 in table format using nested loop
for ($a = 1; $a < 100; $a = $a + 10) {
for ($b = $a; $b < $a + 10; $b++) {
echo $b . " ";
}
echo "<br>";
}
Nested Loop in PHP Means Loop inside Loop
// Print 1 to 100 in table format using nested loop
for ($a = 1; $a < 100; $a = $a + 10) {
for ($b = $a; $b < $a + 10; $b++) {
echo $b . " ";
}
echo "<br>";
}
0 comments
Post a Comment