title: Echo batch file arrays using a variable for the index?
body: <p>If I have a batch file and I am setting arrays with an index that is a variable</p>
  
  <pre><code>@echo off
  SET x=1
  SET myVar[%x%]=happy
  </code></pre>
  
  <p>How do I echo that to get "happy" ?</p>
  
  <p>I've tried</p>
  
  <pre><code>ECHO %myVar[%x%]%
  ECHO %%myVar[%x%]%%
  ECHO myVar[%x%]
  </code></pre>
  
  <p>But none of them work.</p>
  
  <p>It works fine if I use the actual number for the index</p>
  
  <pre><code>ECHO %myVar[1]%
  </code></pre>
  
  <p>But not if the index number is also a variable</p>