{"id":5296,"date":"2012-06-18T09:54:03","date_gmt":"2012-06-18T09:54:03","guid":{"rendered":"http:\/\/phpcodez.com\/?p=5296"},"modified":"2012-06-18T09:54:03","modified_gmt":"2012-06-18T09:54:03","slug":"do-while-loop","status":"publish","type":"post","link":"http:\/\/phpcodez.com\/do-while-loop\/","title":{"rendered":"Do While Loop"},"content":{"rendered":"<p>Do While loop is similar to While loop \u00a0But the difference is that its an exit control loop . That means the code in the loop will get executed at least once<\/p>\n<p><strong>Syntax<\/strong><\/p>\n<p>Do{<br \/>\n\/\/Block of codes<br \/>\n}while (condition)<\/p>\n<p><strong>Example<\/strong><\/p>\n<p>&lt;?php<br \/>\n$i=6;<br \/>\ndo{<br \/>\necho $i++.&#8221; t&#8221;;<br \/>\n}while($i&lt;=5)<br \/>\n?&gt;<\/p>\n<p><strong>Output<\/strong><\/p>\n<p>6<\/p>\n<p>You can see that even though the condition is not true it will print the first value<strong id=\"internal-source-marker_0.5223556663841009\"><\/p>\n<p><\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Do While loop is similar to While loop \u00a0But the difference is that its an exit control loop . That means the code in the loop will get executed at least once Syntax Do{ \/\/Block of codes }while (condition) Example &lt;?php $i=6; do{ echo $i++.&#8221; t&#8221;; }while($i&lt;=5) ?&gt; Output 6 You can see that even &hellip; <a href=\"http:\/\/phpcodez.com\/do-while-loop\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Do While Loop<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[25],"tags":[295,370],"class_list":["post-5296","post","type-post","status-publish","format-standard","hentry","category-php","tag-loop","tag-php"],"_links":{"self":[{"href":"http:\/\/phpcodez.com\/wp-json\/wp\/v2\/posts\/5296","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/phpcodez.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/phpcodez.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/phpcodez.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/phpcodez.com\/wp-json\/wp\/v2\/comments?post=5296"}],"version-history":[{"count":0,"href":"http:\/\/phpcodez.com\/wp-json\/wp\/v2\/posts\/5296\/revisions"}],"wp:attachment":[{"href":"http:\/\/phpcodez.com\/wp-json\/wp\/v2\/media?parent=5296"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/phpcodez.com\/wp-json\/wp\/v2\/categories?post=5296"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/phpcodez.com\/wp-json\/wp\/v2\/tags?post=5296"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}