Switch to full style
:read: Start PHP with us. Includes topics to help you in php
Post a reply

Nesting Two for Loops

Mon Oct 27, 2008 12:56 pm

Code:
<html>
<head>
<title>Nesting Two for Loops</title>
</head>
<body>
<?php
print "<table>\n";
for (
$y=1; $y<=12; $y++ ){
    print
"<tr>\n";

    for (
$x=1; $x<=12; $x++ ) {
        print
"\t<td>";
        print (
$x*$y);
        print
"</td>\n";
    }
    print
"</tr>\n";
}
print
"</table>";
?>
</body>
</html>




Post a reply
  Related Posts  to : Nesting Two for Loops
 C++ For Loops     -  
 C++ for loops     -  
 Loops and Branching     -  
 Break in Nested Loops     -  
 Re: Lets Learn C++----->(Lesson 4) Loops     -  
 write a while loops performing operations on number     -  
 Using Program Loops to Create Time Delays     -  

Topic Tags

PHP Loops