# A division table : for loop « Statement « PHP

Home
PHP
 1 Chart 2 Class 3 Components 4 Cookie Session 5 Data Structure 6 Data Type 7 Date 8 Design Patterns 9 Development 10 DNS 11 Email 12 File Directory 13 Form 14 Functions 15 Graphics Image 16 HTML 17 Language Basics 18 Login Authentication 19 Math 20 MySQL Database 21 Network 22 Operator 23 PDF 24 Reflection 25 Statement 26 String 27 Utility Function 28 Web Services SOAP WSDL 29 XML
 PHP » Statement » for loop
A division table
 ```  A division table

A division table

");   print("
\$count_1
\$count_1%.3f
");   for (\$count_1 = \$start_num;\$count_1 <= \$end_num;\$count_1++)     print("");   print("");   for (\$count_1 = \$start_num;\$count_1 <= \$end_num;\$count_1++){     print("");     for (\$count_2 = \$start_num;\$count_2 <= \$end_num;\$count_2++){         \$result = \$count_1 / \$count_2;         printf("",                \$result);  // see Chapter 108       }     print("\n");   } ?>       ```
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 For loop: Counting By Fives 5 Use for loop to output HTML table 6 For loop format 7 If statement inside a for loop 8 Nesting Two for Loops 9 A for Loop That Divides 4000 by Ten Incremental Numbers 10 Using the for Statement 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 menu with for() 23 Printing out all the web-safe color codes