PHP program to generate a fibonacci series?

What is the logic to generate Fibonacci series.

Below PHP code that will generate the Fibonacci series.

Series:  01123581321

 

echo $a=0;

echo $b=1;

 

while($c < 21)

{

 echo $c = $a+$b;

 $a=$b;

 $b=$c;

}