If statement inside a for loop : For : Language Basics PHP Source Code


PHP Source Code » Language Basics » For »

 

If statement inside a for loop




<?php
  $a = -3;
  for (; $a <= 20; $a++){
      if ($a == 0){
          break;
      }    
      $divide = 40/$a;
      echo "The result of dividing 40 by $a is $divide""<BR>";
  }
  ?>
           
       



HTML code for linking to this page:

Follow Navioo On Twitter

PHP Source Code

 Navioo Language Basics
» For