FEBINOCCI series in PHP

Here we are going to understand how can calculate febinocci series in a LIMIT.

First we should know that what is FEBINOCCI series?

“The Fibonacci Sequence is the series of numbers: 0, 1, 1, 2, 3, 5, 8, 13, 21, 34,... The next number is found by adding up the two numbers before it. Similarly, the 3 is found by adding the two numbers before it (1+2)”


HERE the series come by
0 + 0 = 0
0        +  1 = 1
1        +  1 = 2
2        + 1 = 3
And so on

Now we can go to program program

<! febinocii series > {to create comment in html}
<html>
<body>
<h1>febinocci series</h1>
<form name="form1" method="POST" action = " ">
<input type="text" name="limit">
<input type="submit" name="sub" value="submit">
<form>
</body>
</html>

<?php
if(isset($_POST['sub']))
{
$first=0;
$b=0;
$limit= $_POST['limit'];
for($a=1;$a<=$limit;$a++)
{
$b=$first +$a;
$first =$b;
echo   "<br/>" . $first."<br/>" ;
}
}
?>


Are you confusing!
Don’t worry here I use    echo “  ”;  it is used to write html on php
NOW TRY IN YOUR COMPUTER

THE OUT PUT IS HERE