title: How to pass an array from Symfony 2 controller to a TWIG template ?
body: <p>I can`t pass an array from a symfony 2 controller to a TWIG template. I use this code in the controller:</p>
  
  <pre><code>$searchTerms['color'] = "Red";
  return $this-&gt;render('TestBundle::search.html.twig', 
          array(
              "searchTerms" =&gt; $searchTerms));
  </code></pre>
  
  <p>In the twig template, I am trying to access the variable like this:</p>
  
  <ol>
  <li>{{ searchTerms['color'] }}</li>
  <li>{{ searchTerms.color }}</li>
  </ol>
  
  <p>Both output nothing, empty string, so it seems like array comes to template but its elements are empty.</p>
  
  <p>What`s wrong?</p>