{"id":813,"date":"2021-03-28T09:04:32","date_gmt":"2021-03-28T09:04:32","guid":{"rendered":"https:\/\/phptutorial.net\/?page_id=813"},"modified":"2025-04-06T01:57:45","modified_gmt":"2025-04-06T01:57:45","slug":"php-break","status":"publish","type":"page","link":"https:\/\/www.phptutorial.net\/php-tutorial\/php-break\/","title":{"rendered":"PHP break"},"content":{"rendered":"\n<p><strong>Summary<\/strong>: in this tutorial, you will learn how to use the PHP <code>break<\/code> statement to end the execution of the current <code>for<\/code>, <code>do...while<\/code>, <code>while<\/code> and <code>switch<\/code> statements.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id='introduction-to-the-php-break-statement'>Introduction to the PHP break statement. <a href=\"#introduction-to-the-php-break-statement\" class=\"anchor\" id=\"introduction-to-the-php-break-statement\" title=\"Anchor for Introduction to the PHP break statement.\">#<\/a><\/h2>\n\n\n\n<p>The <code>break<\/code> statement terminates the execution of the current <code><a href=\"https:\/\/phptutorial.net\/php-tutorial\/php-for-loop\/\">for<\/a><\/code>, <code><a href=\"https:\/\/phptutorial.net\/php-tutorial\/php-do-while\/\">do...while<\/a><\/code>, <code><a href=\"https:\/\/phptutorial.net\/php-tutorial\/php-while\/\">while<\/a><\/code>, or <a href=\"https:\/\/phptutorial.net\/php-tutorial\/php-switch\/\"><code>switch<\/code> <\/a>statement. This tutorial focuses on how to use the break statement with the loops.<\/p>\n\n\n\n<p>Typically, you use the <code>break<\/code> statement with the <code><a href=\"https:\/\/phptutorial.net\/php-tutorial\/php-if\/\">if<\/a><\/code> statement that specifies the condition for the terminating loop:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-1\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php\"><span class=\"hljs-keyword\">if<\/span> (condition) {\n    <span class=\"hljs-keyword\">break<\/span>;\n}<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-1\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>The <code>break<\/code>&nbsp;statement accepts an optional number that specifies the number of nested enclosing structures to be broken out of. <\/p>\n\n\n\n<p>If you don&#8217;t specify the optional number, it defaults to <code>1<\/code>. In this case, the <code>break<\/code> statement only terminates the immediate enclosing structure.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id='using-php-break-statement-in-a-for-loop'>Using PHP break statement in a for loop <a href=\"#using-php-break-statement-in-a-for-loop\" class=\"anchor\" id=\"using-php-break-statement-in-a-for-loop\" title=\"Anchor for Using PHP break statement in a for loop\">#<\/a><\/h2>\n\n\n\n<p>The following example illustrates how to use the <code>break<\/code> statement in a <code>for<\/code> loop:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-2\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php\"><span class=\"hljs-meta\">&lt;?php<\/span>\n\n\n<span class=\"hljs-keyword\">for<\/span> ($i = <span class=\"hljs-number\">0<\/span>; $i &lt; <span class=\"hljs-number\">10<\/span>; $i++) {\n\t<span class=\"hljs-keyword\">if<\/span> ($i === <span class=\"hljs-number\">5<\/span>) {\n\t\t<span class=\"hljs-keyword\">break<\/span>;\n\t}\n\t<span class=\"hljs-keyword\">echo<\/span> <span class=\"hljs-string\">\"$i\\n\"<\/span>;\n}<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-2\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p><a href=\"https:\/\/phptutorial.net\/playground\/?q=PD9waHAKCgpmb3IgKCRpID0gMDsgJGkgPCAxMDsgJGkrKykgewoJaWYgKCRpID09PSA1KSB7CgkJYnJlYWs7Cgl9CgllY2hvICIkaVxuIjsKfQ\" target=\"_blank\" rel=\"noreferrer noopener\">Try it<\/a><\/p>\n\n\n\n<p>Output:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-3\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php\"><span class=\"hljs-number\">0<\/span>\n<span class=\"hljs-number\">1<\/span>\n<span class=\"hljs-number\">2<\/span>\n<span class=\"hljs-number\">3<\/span>\n<span class=\"hljs-number\">4<\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-3\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>The <code>for<\/code> statement would execute 10 times from 0 to 9. However, when the <code>$i<\/code> variable reaches <code>5<\/code>, the <code>break<\/code> statement ends the loop immediately. The control is passed to the statement after the <code>for<\/code> statement.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id='using-php-break-statement-in-a-do-while-loop'>Using PHP break statement in a do&#8230;while loop <a href=\"#using-php-break-statement-in-a-do-while-loop\" class=\"anchor\" id=\"using-php-break-statement-in-a-do-while-loop\" title=\"Anchor for Using PHP break statement in a do...while loop\">#<\/a><\/h2>\n\n\n\n<p>The following example illustrates how to use the <code>break<\/code> statement inside a <code>do...while<\/code> loop:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-4\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php\"><span class=\"hljs-meta\">&lt;?php<\/span>\n\n$j = <span class=\"hljs-number\">0<\/span>;\n<span class=\"hljs-keyword\">do<\/span> {\n\t<span class=\"hljs-keyword\">if<\/span> ($j === <span class=\"hljs-number\">5<\/span>) {\n\t\t<span class=\"hljs-keyword\">break<\/span>;\n\t}\n\t<span class=\"hljs-keyword\">echo<\/span> <span class=\"hljs-string\">\"$j\\n\"<\/span>;\n\t$j++;\n} <span class=\"hljs-keyword\">while<\/span> ($j &lt;= <span class=\"hljs-number\">10<\/span>);<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-4\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p><a href=\"https:\/\/phptutorial.net\/playground\/?q=PD9waHAKCiRqID0gMDsKZG8gewoJaWYgKCRqID09PSA1KSB7CgkJYnJlYWs7Cgl9CgllY2hvICIkalxuIjsKCSRqKys7Cn0gd2hpbGUgKCRqIDw9IDEwKTs\" target=\"_blank\" rel=\"noreferrer noopener\">Try it<\/a><\/p>\n\n\n\n<p>Output:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-5\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php\"><span class=\"hljs-number\">0<\/span>\n<span class=\"hljs-number\">1<\/span>\n<span class=\"hljs-number\">2<\/span>\n<span class=\"hljs-number\">3<\/span>\n<span class=\"hljs-number\">4<\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-5\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>In this example, the <code>do-while<\/code> loop executes only five iterations. The variable <code>$j<\/code> is increased by one in each iteration. When the <code>$j<\/code> variable reaches <code>5<\/code>, the <code>break<\/code> statement terminates the loop immediately.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id='using-php-break-statement-in-a-while-loop'>Using PHP break statement in a while loop <a href=\"#using-php-break-statement-in-a-while-loop\" class=\"anchor\" id=\"using-php-break-statement-in-a-while-loop\" title=\"Anchor for Using PHP break statement in a while loop\">#<\/a><\/h2>\n\n\n\n<p>The following example shows how to use the <code>break<\/code> statement in a <code>while<\/code> loop:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-6\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php\">$k = <span class=\"hljs-number\">0<\/span>;\n<span class=\"hljs-keyword\">while<\/span> ($k &lt;= <span class=\"hljs-number\">10<\/span>) {\n\t<span class=\"hljs-keyword\">if<\/span> ($k === <span class=\"hljs-number\">5<\/span>) {\n\t\t<span class=\"hljs-keyword\">break<\/span>;\n\t}\n\t<span class=\"hljs-keyword\">echo<\/span> <span class=\"hljs-string\">\"$k\\n\"<\/span>;\n\t$k++;\n}<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-6\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p><a href=\"https:\/\/phptutorial.net\/playground\/?q=PD9waHAKCiRrID0gMDsKd2hpbGUgKCRrIDw9IDEwKSB7CglpZiAoJGsgPT09IDUpIHsKCQlicmVhazsKCX0KCWVjaG8gIiRrXG4iOwoJJGsrKzsKfQ\" target=\"_blank\" rel=\"noreferrer noopener\">Try it<\/a><\/p>\n\n\n\n<p>Output:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-7\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php\"><span class=\"hljs-number\">0<\/span>\n<span class=\"hljs-number\">1<\/span>\n<span class=\"hljs-number\">2<\/span>\n<span class=\"hljs-number\">3<\/span>\n<span class=\"hljs-number\">4<\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-7\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>This example also displays five numbers from <code>0<\/code> to <code>4<\/code>. In each iteration, the variable <code>$k<\/code> is increased by one. <\/p>\n\n\n\n<p>The <code>break<\/code> statement terminates the loop immediately when the <code>$k<\/code> variable reaches <code>5<\/code>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id='using-break-statement-to-jump-out-of-a-nested-loop'>Using break statement to jump out of a nested loop <a href=\"#using-break-statement-to-jump-out-of-a-nested-loop\" class=\"anchor\" id=\"using-break-statement-to-jump-out-of-a-nested-loop\" title=\"Anchor for Using break statement to jump out of a nested loop\">#<\/a><\/h2>\n\n\n\n<p>The following example illustrates how to use the break statement to break of out a nested loop:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-8\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php\"><span class=\"hljs-meta\">&lt;?php<\/span>\n\n$i = <span class=\"hljs-number\">0<\/span>;\n$j = <span class=\"hljs-number\">0<\/span>;\n<span class=\"hljs-keyword\">for<\/span> ($i = <span class=\"hljs-number\">0<\/span>; $i &lt; <span class=\"hljs-number\">5<\/span>; $i++) {\n\t<span class=\"hljs-keyword\">for<\/span> ($j = <span class=\"hljs-number\">0<\/span>; $j &lt; <span class=\"hljs-number\">3<\/span>; $j++) {\n\t\t<span class=\"hljs-keyword\">if<\/span> ($i === <span class=\"hljs-number\">3<\/span>) {\n\t\t\t<span class=\"hljs-keyword\">break<\/span> <span class=\"hljs-number\">2<\/span>;\n\t\t}\n\t\t<span class=\"hljs-keyword\">echo<\/span> <span class=\"hljs-string\">\"($i, $j)\\n\"<\/span>;\n\t}\n}<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-8\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>Output:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-9\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php\">(<span class=\"hljs-number\">0<\/span>, <span class=\"hljs-number\">0<\/span>)\n(<span class=\"hljs-number\">0<\/span>, <span class=\"hljs-number\">1<\/span>)\n(<span class=\"hljs-number\">0<\/span>, <span class=\"hljs-number\">2<\/span>)\n(<span class=\"hljs-number\">1<\/span>, <span class=\"hljs-number\">0<\/span>)\n(<span class=\"hljs-number\">1<\/span>, <span class=\"hljs-number\">1<\/span>)\n(<span class=\"hljs-number\">1<\/span>, <span class=\"hljs-number\">2<\/span>)\n(<span class=\"hljs-number\">2<\/span>, <span class=\"hljs-number\">0<\/span>)\n(<span class=\"hljs-number\">2<\/span>, <span class=\"hljs-number\">1<\/span>)\n(<span class=\"hljs-number\">2<\/span>, <span class=\"hljs-number\">2<\/span>)<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-9\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p><a href=\"https:\/\/phptutorial.net\/playground\/?q=PD9waHAKCiRpID0gMDsKJGogPSAwOwpmb3IgKCRpID0gMDsgJGkgPCA1OyAkaSsrKSB7Cglmb3IgKCRqID0gMDsgJGogPCAzOyAkaisrKSB7CgkJaWYgKCRpID09PSAzKSB7CgkJCWJyZWFrIDI7CgkJfQoJCWVjaG8gIigkaSwgJGopXG4iOwoJfQp9\" target=\"_blank\" rel=\"noreferrer noopener\">Try it<\/a><\/p>\n\n\n\n<p>In this example, when the variable <code>$i<\/code> reaches <code>3<\/code>, the <code>break<\/code> statement terminates the inner and outer loops immediately. <\/p>\n\n\n\n<p>By default, the <code>break<\/code> statement only ends the enclosing loop. But in this example, we use the number 2 in the break statement; therefore, it terminates both inner and outer loops.<\/p>\n\n\n\n<p>If you remove the number 2, you will see a different output:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-10\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php\"><span class=\"hljs-meta\">&lt;?php<\/span>\n\n$i = <span class=\"hljs-number\">0<\/span>;\n$j = <span class=\"hljs-number\">0<\/span>;\n<span class=\"hljs-keyword\">for<\/span> ($i = <span class=\"hljs-number\">0<\/span>; $i &lt; <span class=\"hljs-number\">5<\/span>; $i++) {\n\t<span class=\"hljs-keyword\">for<\/span> ($j = <span class=\"hljs-number\">0<\/span>; $j &lt; <span class=\"hljs-number\">3<\/span>; $j++) {\n\t\t<span class=\"hljs-keyword\">if<\/span> ($i === <span class=\"hljs-number\">3<\/span>) {\n\t\t\t<span class=\"hljs-keyword\">break<\/span>;\n\t\t}\n\t\t<span class=\"hljs-keyword\">echo<\/span> <span class=\"hljs-string\">\"($i, $j)\\n\"<\/span>;\n\t}\n}<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-10\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p><a href=\"https:\/\/phptutorial.net\/playground\/?q=PD9waHAKCiRpID0gMDsKJGogPSAwOwpmb3IgKCRpID0gMDsgJGkgPCA1OyAkaSsrKSB7Cglmb3IgKCRqID0gMDsgJGogPCAzOyAkaisrKSB7CgkJaWYgKCRpID09PSAzKSB7CgkJCWJyZWFrOwoJCX0KCQllY2hvICIoJGksICRqKVxuIjsKCX0KfQ\" target=\"_blank\" rel=\"noreferrer noopener\">Try it<\/a><\/p>\n\n\n\n<p>Output:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-11\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php\">(<span class=\"hljs-number\">0<\/span>, <span class=\"hljs-number\">0<\/span>)\n(<span class=\"hljs-number\">0<\/span>, <span class=\"hljs-number\">1<\/span>)\n(<span class=\"hljs-number\">0<\/span>, <span class=\"hljs-number\">2<\/span>)\n(<span class=\"hljs-number\">1<\/span>, <span class=\"hljs-number\">0<\/span>)\n(<span class=\"hljs-number\">1<\/span>, <span class=\"hljs-number\">1<\/span>)\n(<span class=\"hljs-number\">1<\/span>, <span class=\"hljs-number\">2<\/span>)\n(<span class=\"hljs-number\">2<\/span>, <span class=\"hljs-number\">0<\/span>)\n(<span class=\"hljs-number\">2<\/span>, <span class=\"hljs-number\">1<\/span>)\n(<span class=\"hljs-number\">2<\/span>, <span class=\"hljs-number\">2<\/span>)\n(<span class=\"hljs-number\">4<\/span>, <span class=\"hljs-number\">0<\/span>)\n(<span class=\"hljs-number\">4<\/span>, <span class=\"hljs-number\">1<\/span>)\n(<span class=\"hljs-number\">4<\/span>, <span class=\"hljs-number\">2<\/span>)<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-11\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>In this example, the break statement ends the inner loop when <code>$i<\/code> is <code>3<\/code>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id='summary'>Summary <a href=\"#summary\" class=\"anchor\" id=\"summary\" title=\"Anchor for Summary\">#<\/a><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Use the <code>break<\/code> statement to immediately terminate the execution of the current <code>for<\/code>, <code>do...while<\/code>, and <code>while<\/code> loops.<\/li>\n<\/ul>\n<div class=\"helpful-block-content\" data-title=\"\">\n\t<header>\n\t\t<div class=\"wth-question\">Did you find this tutorial useful?<\/div>\n\t\t<div class=\"wth-thumbs\">\n\t\t\t<button\n\t\t\t\tdata-post=\"813\"\n\t\t\t\tdata-post-url=\"https:\/\/www.phptutorial.net\/php-tutorial\/php-break\/\"\n\t\t\t\tdata-post-title=\"PHP break\"\n\t\t\t\tdata-response=\"1\"\n\t\t\t\tclass=\"wth-btn-rounded wth-yes-btn\"\n\t\t\t>\n\t\t\t\t<svg\n\t\t\t\t\txmlns=\"http:\/\/www.w3.org\/2000\/svg\"\n\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\tfill=\"none\"\n\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\tstroke-width=\"2\"\n\t\t\t\t\tstroke-linecap=\"round\"\n\t\t\t\t\tstroke-linejoin=\"round\"\n\t\t\t\t\tclass=\"feather feather-thumbs-up block w-full h-full\"\n\t\t\t\t>\n\t\t\t\t\t<path\n\t\t\t\t\t\td=\"M14 9V5a3 3 0 0 0-3-3l-4 9v11h11.28a2 2 0 0 0 2-1.7l1.38-9a2 2 0 0 0-2-2.3zM7 22H4a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2h3\"\n\t\t\t\t\t><\/path>\n\t\t\t\t<\/svg>\n\t\t\t\t<span class=\"sr-only\"> Yes <\/span>\n\t\t\t<\/button>\n\n\t\t\t<button\n\t\t\t\tdata-response=\"0\"\n\t\t\t\tdata-post=\"813\"\n\t\t\t\tdata-post-url=\"https:\/\/www.phptutorial.net\/php-tutorial\/php-break\/\"\n\t\t\t\tdata-post-title=\"PHP break\"\n\t\t\t\tclass=\"wth-btn-rounded wth-no-btn\"\n\t\t\t>\n\t\t\t\t<svg\n\t\t\t\t\txmlns=\"http:\/\/www.w3.org\/2000\/svg\"\n\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\tfill=\"none\"\n\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\tstroke-width=\"2\"\n\t\t\t\t\tstroke-linecap=\"round\"\n\t\t\t\t\tstroke-linejoin=\"round\"\n\t\t\t\t>\n\t\t\t\t\t<path\n\t\t\t\t\t\td=\"M10 15v4a3 3 0 0 0 3 3l4-9V2H5.72a2 2 0 0 0-2 1.7l-1.38 9a2 2 0 0 0 2 2.3zm7-13h2.67A2.31 2.31 0 0 1 22 4v7a2.31 2.31 0 0 1-2.33 2H17\"\n\t\t\t\t\t><\/path>\n\t\t\t\t<\/svg>\n\t\t\t\t<span class=\"sr-only\"> No <\/span>\n\t\t\t<\/button>\n\t\t<\/div>\n\t<\/header>\n\n\t<div class=\"wth-form hidden\">\n\t\t<div class=\"wth-form-wrapper\">\n\t\t\t<div class=\"wth-title\"><\/div>\n\t\t\t\n\t\t\t<textarea class=\"wth-message\"><\/textarea>\n\n\t\t\t<button class=\"btn btn-primary wth-btn-submit\">Send<\/button>\n\t\t\t<button class=\"btn wth-btn-cancel\">Cancel<\/button>\n\t\t\n\t\t<\/div>\n\t<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Summary: in this tutorial, you will learn how to use the PHP break statement to end the execution of the current for, do&#8230;while, while and switch statements. Introduction to the PHP break statement. # The break statement terminates the execution of the current for, do&#8230;while, while, or switch statement. This tutorial focuses on how to [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":15,"menu_order":31,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-813","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.phptutorial.net\/wp-json\/wp\/v2\/pages\/813","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.phptutorial.net\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.phptutorial.net\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.phptutorial.net\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.phptutorial.net\/wp-json\/wp\/v2\/comments?post=813"}],"version-history":[{"count":5,"href":"https:\/\/www.phptutorial.net\/wp-json\/wp\/v2\/pages\/813\/revisions"}],"predecessor-version":[{"id":3012,"href":"https:\/\/www.phptutorial.net\/wp-json\/wp\/v2\/pages\/813\/revisions\/3012"}],"up":[{"embeddable":true,"href":"https:\/\/www.phptutorial.net\/wp-json\/wp\/v2\/pages\/15"}],"wp:attachment":[{"href":"https:\/\/www.phptutorial.net\/wp-json\/wp\/v2\/media?parent=813"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}