Write a program to count 5 to 15 using PHP loop
Description:
Write a Program to display count, from 5 to 15 using PHP loop as given below.
Rules & Hint
- You can use “for” or “while” loop
- You can use variable to initialize count
- You can use html tag for line break
View Solution/Program
<?php
$count = 5;
while($count <= 15)
{
echo $count;
echo "<br>" ;
$count++;
}
?>
Tutorials Class - Output Window
5
6
7
8
9
10
11
12
13
14
15
Learn more about the similar topics:
Tutorials |
---|
PHP Loops |
Interview Questions & Answers |
---|
No Content Found. |