how do I create a multidimensional associative array inside of a foreach loop?
<p>I want to create an array that looks like this</p>

<pre><code> $appsByOs = Array(
                  osName1 =&gt;Array(0=&gt;app1,1=&gt;app2)
                  osName2 =&gt;Array(0=&gt;app1,1=&gt;app2)
                  etc.....
  )
</code></pre>

<p>how could i do this inside of a foreach loop?</p>

<pre><code>  foreach($osInstanceNames as $osInstanceName){
                    $appNames(array of app names for current os)

            }
</code></pre>

<p>thanks</p>
