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
Exercises & Assignments
Write a program to count 5 to 15 using PHP loop
Write a factorial program using for loop in php
Factorial program in PHP using recursive function
Write a program to create Chess board in PHP using for loop
Write a Program to create given pattern with * using for loop
Interview Questions & Answers
No Content Found.