do while Loop in PHP

Notes:

PHP do while loop: Exit control loop
- PHP engine executes the statements in a do while loop at least once; and then repeatedly executes the statements in a do while loop as long as the given conditional expression evaluates to true.

Syntax:
initialization;
do
{
statement(s);
increment/decrement;
} while(conditional expression); // Condition is checked at the end of the loop

Note: There is no alternative syntax for do-while loop

Ex:
$i=1;
do{
echo("Hello World <br/>");
$i++;
}while($i<=5);

Note: When you want to execute some set of statements at least once, then use do while loop.

Interview Questions:

1. PHP stands for ______________
a. Hypertext Preprocessor
b. Preprocessor Hypertext
c. Personal Home Processor
d. Personal Hypertext processor
Ans: a