title: How can I use break or continue within for loop in Twig template?
body: <p>I try to use a simple loop, in my real code this loop is more complex, and I need to <code>break</code> this iteration like:</p>
  
  <pre><code>{% for post in posts %}
      {% if post.id == 10 %}
          {# break #}
      {% endif %}
      &lt;h2&gt;{{ post.heading }}&lt;/h2&gt;
  {% endfor %}
  </code></pre>
  
  <p>How can I use behavior of <code>break</code> or <code>continue</code> of PHP control structures in Twig?</p>