Using the for Statement : for loop « Statement « PHP
- PHP
- Statement
- for loop
Using the for Statement
<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>
Related examples in the same category