Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function GenerateFibonacciNumber($iMaxVal = 10)
- {
- $iFibonacci[4];
- $iFibonacci[1] = 1;
- echo("VALUE: 0<br>");
- echo("VALUE: 1 <br>");
- for($i; $i < $iMaxVal; $i++)
- {
- $iFibonacci[3] = $iFibonacci[1];
- $iFibonacci[1] = ($iFibonacci[1] + $iFibonacci[0]);
- $iFibonacci[0] = $iFibonacci[3];
- echo("VALUE: ".$iFibonacci[1]."<br>");
- }
- return true;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement