➤ Fibonacci series is the one in which you will get your next term by adding previous two numbers. For instance:
$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 
by Levani Makhareishvili
2 years ago
PHP
1
Pro tip: use ```triple backticks around text``` to write in code fences