Outlines Chapter 3 –Chapter 3 – Loops & Revision –Loops while do … while – revision 1.
While Loops in PHP
4
LOOPS WHILE LOOPS
-
Upload
suraj-motee -
Category
Education
-
view
39 -
download
0
Transcript of While Loops in PHP
LOOPSWHILE LOOPS
Loops
• PHP while loops execute a block of code while the specified condition is true.• while (condition is true) { code to be executed;}
Exercise:• Print 0-4 on the screen.
Exercise:
• The do...while loop will always execute the block of code once, it will then check the condition, and repeat the loop while the specified condition is true.