For loop: Counting By Fives : for loop « Statement « PHP






For loop: Counting By Fives


<html>

<head>
<title>
Counting By Fives
</title>
</head>

<body>

<h1>Counting By Fives</h1>

<?

for ($i = 5; $i <= 50; $i+= 5){
  print "$i <br>\n";
} // end for loop

?>
</body>

</html>
           
       








Related examples in the same category

1.For statement without second condition
2.For statement without all three statements
3.For loop: Counting Backwards
4.Use for loop to output HTML table
5.For loop format
6.If statement inside a for loop
7.Nesting Two for Loops
8.A for Loop That Divides 4000 by Ten Incremental Numbers
9.Using the for Statement
10.A division table
11.A for Loop That Divides 4000 by Ten Incremental Numbers
12.A for loop in PHP
13.Alternating table row colors with for()
14.Loops Within Loops
15.Iterating through a multidimensional array with for()
16.Iterating through a numeric array with for()
17.Loop goes from 0 to 100 in steps of 0.1
18.Fahrenheit and Celsius table by for loop
19.Specifying a number after break, such as break 2, to break out of two loops or switch/case statements
20.Multiple expressions in for()
21.Nesting Two for Loops
22.Printing a
23.Printing out all the web-safe color codes