+ 3

Need help on this PHP code

When I type this code why is the output "The number is 1" . Isn't the output supposed to be "The number is 1 The number is 2 The number is 3" and so on u til it reaches nine. Somebody please help <?php $i = 1; do {echo "The number is " . $i . "<br /"; $i++; } while($i <= 9); ?>

9th Jul 2018, 12:47 PM
Simar
Simar - avatar
2 Answers
+ 3
You didn' t close the br tag
9th Jul 2018, 1:10 PM
Mert Yazıcı
Mert Yazıcı - avatar
+ 2
thank you!
9th Jul 2018, 1:12 PM
Simar
Simar - avatar