title: Powershell add to Multidimensional Array
body: <p>I want to create a multidimensional array in powershell like this:</p>
  
  <pre><code>$array[0] = "colours"
  $array[0][0] = "red"
  $array[0][1] = "blue"
  $array[1] = "animals"
  $array[1][0] = "cat"
  $array[1][0] = "dog"
  </code></pre>
  
  <p>Here's what i tried:</p>
  
  <pre><code>$array = @()
  $array += "colours"
  $array += "animals"
  
  $array[0] # outputs "colours"
  $array[1] # outputs "animals"
  
  $array[0] = @()
  $array[1] = @()
  
  $array[0] += "red"
  $array[0] += "blue"
  $array[1] += "cat"
  $array[1] += "dog"
  
  $array[0] # outputs "red", "blue" - i expected "colours" here
  $array[0][0] # outputs "red"
  </code></pre>
  
  <p>I appreciate any hints.</p>
  
  <p>Thanks in advance</p>