while.php  simple while loop
  php source code
    $i = 0;
    $num = 50;
    while($i<10)
    {
      $num--;
      $i++;
    }
    echo ("Loop stopped at i = $i and num = $num 
\n"); Loop stopped at i = 10 and num = 40