{"id":14186,"date":"2020-06-02T13:35:18","date_gmt":"2020-06-02T13:35:18","guid":{"rendered":"https:\/\/www.devopsschool.com\/blog\/?p=14186"},"modified":"2021-11-05T11:02:37","modified_gmt":"2021-11-05T11:02:37","slug":"how-to-print-fibonacci-series-in-php-embedded-in-html-1","status":"publish","type":"post","link":"https:\/\/www.devopsschool.com\/blog\/how-to-print-fibonacci-series-in-php-embedded-in-html-1\/","title":{"rendered":"How to print Fibonacci series in PHP embedded in HTML ? -1"},"content":{"rendered":"\n<p>How to print Fibonacci series in PHP?<\/p>\n\n\n\n<p>What is Fibonacci series?<\/p>\n\n\n\n<p>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, &amp; so on.                              Here, 0+1 = 1                                                                                                                         1+1=2                                                                                                                          3+2=5 &#8230;.<\/p>\n\n\n\n<p>Logic:<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>First initial the 1st and 2nd number as 0 and 1.<\/li><li>Print 1st and 2nd number.<\/li><li>From next number, start loop(for loop using here). So 3rd number will be the sum of the previous two numbers.<\/li><\/ol>\n\n\n\n<script src=\"https:\/\/gist.github.com\/ushakiran27\/e43a947ff42f330b3b20a739c2c805e9.js\"><\/script>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"576\" src=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/06\/image-1024x576.png\" alt=\"\" class=\"wp-image-14189\" srcset=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/06\/image-1024x576.png 1024w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/06\/image-300x169.png 300w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/06\/image-768x432.png 768w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/06\/image-355x199.png 355w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2020\/06\/image.png 1366w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption>Entering number 5<\/figcaption><\/figure>\n\n\n\n<p>Output: 0 1 1 2 3<\/p>\n\n\n<div class=\"epyt-gallery\" data-currpage=\"1\" id=\"epyt_gallery_34824\"><figure class=\"wp-block-embed wp-block-embed-youtube is-type-video is-provider-youtube epyt-figure\"><div class=\"wp-block-embed__wrapper\"><iframe loading=\"lazy\"  id=\"_ytid_17277\"  width=\"760\" height=\"427\"  data-origwidth=\"760\" data-origheight=\"427\" src=\"https:\/\/www.youtube.com\/embed\/?enablejsapi=1&#038;autoplay=0&#038;cc_load_policy=0&#038;cc_lang_pref=&#038;iv_load_policy=1&#038;loop=0&#038;rel=1&#038;fs=1&#038;playsinline=0&#038;autohide=2&#038;theme=dark&#038;color=red&#038;controls=1&#038;disablekb=0&#038;\" class=\"__youtube_prefs__  no-lazyload\" title=\"YouTube player\"  data-epytgalleryid=\"epyt_gallery_34824\"  allow=\"fullscreen; accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen data-no-lazy=\"1\" data-skipgform_ajax_framebjll=\"\"><\/iframe><\/div><\/figure><div class=\"epyt-gallery-list\"><div>Sorry, there was a YouTube error.<\/div><\/div><\/div>\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>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, &amp; so on. Here, 0+1 = 1 1+1=2 3+2=5 &#8230;. Logic: First initial the 1st and 2nd&#8230;<\/p>\n","protected":false},"author":29,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","_joinchat":[],"footnotes":""},"categories":[5150],"tags":[],"class_list":["post-14186","post","type-post","status-publish","format-standard","hentry","category-php"],"_links":{"self":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/14186","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/users\/29"}],"replies":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/comments?post=14186"}],"version-history":[{"count":8,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/14186\/revisions"}],"predecessor-version":[{"id":24808,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/14186\/revisions\/24808"}],"wp:attachment":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media?parent=14186"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/categories?post=14186"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/tags?post=14186"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}