Do-While Control Structure:
Do-While loop is another type of loop which runs at least once, since this loop checks the condition after executing the code within. We generally use Do-While loop when the iteration must run at least once despite of the validity of the variable. In Do-While loop we need to initialize the variable first the coding within the loop executes and at last the this loop checks the condition. We should change the value of the variable within the loop.
Format of do-while loop is as follows:
echo "Value of \$i is $i <br/>";
Value of $i is 34
Posted on: March 26, 2010 If you enjoyed this post then why not add us on Google+? Add us to your Circles