Home » Programming » php » PHP while loop

PHP while loop

If specified conditions are true then it executes that code.

while – As long conditions is true, it loop back again and again through block of code.

Syntax:
while (condition is true) {
code to be executed;
}

Example:

Result:

The number is: 11
The number is: 12
The number is: 13

Please follow and like us:
error

Leave a comment

Your email address will not be published.