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

while Statement in php

Mon Oct 27, 2008 6:21 pm

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




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

Topic Tags

PHP Loops