title: defining a table key with a variable
body: <p>In PHP I can define a table/array like this:</p>
  
  <pre><code>$string = 'foo';
  
  $array = array();
  $array[$string] = 'bar';
  print_r($array);         // Result: Array ( [foo] =&gt; bar )
  </code></pre>
  
  <p>so I used the <code>$string</code> to define the key of the first array entry.</p>
  
  <p>How can I accomplish the same in lua?</p>
  
  <p>Edit:</p>
  
  <p>And can I access the result the like this?</p>
  
  <pre><code>print($array[$string]);  // Result: bar
  </code></pre>