How to print Fibonacci series in PHP embedded in HTML ? -1
How to print Fibonacci series in PHP?
What is Fibonacci series?
A series of numbers in which each number is the sum of the two preceding numbers. The simplest is the series 0,1, 1, 2, 3, 5, 8, & so on. Here, 0+1 = 1 1+1=2 3+2=5 ….
Logic:
- First initial the 1st and 2nd number as 0 and 1.
- Print 1st and 2nd number.
- From next number, start loop(for loop using here). So 3rd number will be the sum of the previous two numbers.

Output: 0 1 1 2 3
With MotoShare.in, you can book a bike instantly, enjoy doorstep delivery, and ride without worries. Perfect for travelers, professionals, and adventure enthusiasts looking for a seamless mobility solution.
Find Trusted Cardiac Hospitals
Compare heart hospitals by city and services — all in one place.
Explore Hospitals