PHP Programs

Program for while loop

In this program demonstrate use of while loop.  While Loops are used to execute statement repeatedly depending on condition

While loop are used to execute statements (block) of code a repeatedly until the condition gets satisfied




<title> while...loop</title>











    echo"loop stopped at i=$i and num=$num";




When Run The Program Following Output:

loop stopped at i=10 and num=40


While loop is another loop that execute block of code if given condition is true.


Syntax of while


while (condition)


//block of code to be executed if condition true;


Releted Programs

© 2017 codewmAll rights reserved.