我想创建一个看起来像这样的数组
$appsByOs = Array(
osName1 =>Array(0=>app1,1=>app2)
osName2 =>Array(0=>app1,1=>app2)
etc.....
)
我怎么能在 foreach 循环中做到这一点?
foreach($osInstanceNames as $osInstanceName){
$appNames(array of app names for current os)
}
谢谢