title: Php output array in Twig
body: <p>I'm trying to output an array in twig, but I don't have enough experience in Twig.</p>
  
  <p>I just don’t know how to output a non-associative array if the keys are index
  Array 
  $c_comments of such </p>
  
  <pre><code>Array
  (
      [0] =&gt; Array
          (
              [0] =&gt; 20:28 28:05:2019
              [1] =&gt; dokl
              [2] =&gt; 45645
          )
  
      [1] =&gt; Array
          (
              [0] =&gt; 20:27 28:05:2019
              [1] =&gt; Alex
              [2] =&gt; 546
          )
  
  )
  </code></pre>
  
  <pre><code>    {% for vars.item.c_page in vars.item.comment %}
         &lt;li&gt;{{ vars.item.comment. }}&lt;/li&gt;
      {% endfor %}
  </code></pre>
  
  <p>This is how I display an array in php, also needed in twig</p>
  
  <pre class="lang-php prettyprint-override"><code>&lt;div class="c_comments"&gt;&lt;i&gt;'.$c_comments[$i][0].' '.$c_comments[$i][1].' Wrote:&lt;/i&gt;&lt;br&gt;'.$c_comments[$i][2].'&lt;/div&gt;';
  </code></pre>
  
  <p>Because of this, the template simply doesn't work.
  So transfer the data to the template</p>
  
  <pre class="lang-php prettyprint-override"><code>$item = ['first' =&gt; $number_f, 'two' =&gt; $number_t, 'comment' =&gt; $c_comments, 'c_page' =&gt; $c_page,'pagination' =&gt; $varPagination];
  $this-&gt;registry['template']-&gt;set('item', $item);
  </code></pre>
  
  <p>Where is my mistake?</p>