A while Statement : While loop « Statement « PHP
- PHP
- Statement
- While loop
A while Statement
<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>
Related examples in the same category