title: Smarty: Use a variable for Array to get next Index
body: <p>my array:</p>
  
  <pre><code>$array[0].item = '1'
  $array[1].item = '2'
  $array[2].item = '3'
  ...
  </code></pre>
  
  <p>Now I want get the Value of the Next Index: (counter methode)</p>
  
  <pre><code>{counter assign=i start=1 print=false}
  {foreach $array as $myArray}
      var currentValue = {$myArray.item}; // currentValue = 1
      var nextValue = {$array[$i].item}; // doesn't work 
      {counter}
  {/foreach}
  </code></pre>
  
  <p>The Variable $i is in the first loop exactly '1' but i cant use it for the Array as index, why?</p>