PHP While Loop

PHP while loop is used to run the same block of code until a condition is met. It should be used if number of iteration it not known.

Syntax:

Example:

Output

1

2

3

4

5

Leave a Comment