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

Using the for Statement

Mon Oct 27, 2008 12:57 pm

Code:
<html>
<head>
<title>Using the for Statement</title>
</head>
<body>
<?php
for ( $counter=1; $counter<=12; $counter++ ) {
    print
"$counter times 2 is ".($counter*2)."<br>";
}
?>
</body>
</html>




Post a reply
  Related Posts  to : Using the for Statement
 difference between break statement and a continue statement     -  
 difference between a while statement and a do statement     -  
 Need help with if statement     -  
 while Statement in php     -  
 The do...while Statement     -  
 PHP if statement and else if     -  
 Using the continue Statement     -  
 JOptions and If - Else statement     -  
 Define statement     -  
 For statement without all three statements     -  

Topic Tags

PHP Loops