title: how to convert php to twig syntax
body: <p>Does anyone know how to covert this to twig?</p>
  <pre><code>        &lt;?php for ($i = 0; $i &lt; count($discounts); $i++) { ?&gt;
          &lt;?php if ($i == (count($discounts) - 1)) { ?&gt;
  &lt;?php echo $discounts[$i]['quantity']; ?&gt; - &lt;?php echo ($discounts[$i + 1]['quantity'] - 1); ?&gt;&lt;br&gt;&lt;?php echo $discounts[$i]['price']; ?&gt; 
          
          &lt;?php } ?&gt;
          &lt;?php } ?&gt;
  </code></pre>
  <p>Tried something like this but couldn't get it to work</p>
  <pre><code>        {% for discount in discounts %}
      {% set next_item = discounts[loop.index0 + 1] %}
  {{ discount.quantity }} - {{ next_item.quantity }}{{ text_discount }}&lt;br&gt;{{ discount.price }}
  </code></pre>