Tuesday 20 March 2012

while

<html>
<body>
<?php 
$i=1;
while($i<=5)
  {
  echo "The number is " . $i . "<br />";
  $i++;
  }
?>
</body>
</html>

output
The number is 1
The number is 2
The number is 3
The number is 4
The number is 5

No comments:

Post a Comment