PHP while Loop
The while loop executes a block of code as long as the specified condition is true.Syntax
while (condition is true) { code to be executed; }Example :
<?php $a = 1; while($x <= 10) { echo "The number is: $x <br>"; $x++; } ?>
while (condition is true) { code to be executed; }Example :
<?php $a = 1; while($x <= 10) { echo "The number is: $x <br>"; $x++; } ?>
No comments:
Post a Comment