PHP Programing language

How can using if statement inside for loop
Previous Home Next
<html>
<head><title>Using IF statement in for loop</title></head>
<body>
<div>
<?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>";
  }
  ?>
</div>
</body>
</html>

 

output
Previous Home Next

Tolal:0 Click:

Show All Comments

Did not find what you were looking for leave your name and message. We will revert within 24 hours
Name:
eMail:
Comment / Feedback: