infolink

Thursday 29 March 2012

The do...while Loop Example in PHP

In this Example I discus the do...while loop in php. In the do...while loop first execute the statement of loop and then check the condition. When the loop start first time the statements between the loop must execute and after that statements will execute if the condition will true, if the conditions will not true then the loop will be terminate.

This is the example code of PHP do while loop:


<?php
$i=1;
do
  {
  $i++;
  echo "The number is " . $i . "<br />";
  }
while ($i<=5);
?>

1 comment:

  1. This is an awesome post.Really very informative and creative contents. These concept is a good way to enhance the knowledge.I like it and help me to development very well.Thank you for this brief explanation and very nice information.Well, got a good knowledge.
    Dot Net Training Center in Chennai
    Manual Testing Training in Chennai
    Java Training Institute in Chennai
    PHP Training Institutes

    ReplyDelete