<?php
$first = 0;
$second = 1;
$n = 50;
print $first . '<br>';
print $second . '<br>';
for ($i = 1; $i <= $n -1; $i++)
{
    $final = $first + $second;
    $first = $second;
    $second = $final;

    print $final . '<br>';
}
?>
Published in: PHP
Download

Related snippets