Fibonacci Series in PHP

This program is create fibonacci series till 10 number.
Ex: 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.

<?php
 $f1 = 0;
 $f2 = 1;
 echo "Fibonacci series ";
   for($count=0;$count < 10;$count++)
    {
      $f3 = $f2 + $f1;
      echo $f3 ." ";
      $f1 = $f2 ;
      $f2 = $f3 ;
    }
?>

Output of Program: Fibonacci series 1 2 3 5 8 13 21 34 55 89

Labels: