$num = 0;
$n1 = 0;
$n2 = 1;
echo "Fibonacci series for first 20 numbers: \n";
echo $n1.' '.$n2.' ';
while ( $num < 18 )
{
$n3 = $n2 + $n1;
echo $n3.' ';
$n1 = $n2;
$n2 = $n3;
$num = $num + 1;
}
// 0 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987 1597 2584 4181