Write a PHP Program to display the Fibonacci series.



Write a PHP Program to display the Fibonacci series.

<!DOCTYPE html>
<html>
<head>
          <title>Practicle-3</title>
</head>
<body>
<?php
$count=0;
$no1=0;
$no2=1;
$tot=0;
while($count<=10)
{
          echo $tot."</br>";
          $no1=$no2;
          $no2=$tot;
          $tot=$no1+$no2;
          $count++;
}

?>
</body>
</html>
OUTPUT:-

0
1
1
2
3
5
8
13
21
34
55

Comments