【发布时间】:2011-07-30 18:44:59
【问题描述】:
让我们说从零到更多是价值的重要水平
# very imporant
0 =>
array
'index' => string 'helloworld:Index' (length=16)
404 => string 'helloworld:Missinga' (length=19)
503 => string 'helloworld:Offline' (length=18)
'nojs' => string 'helloworld:Nojs' (length=15)
'blog' => string 'helloworld:blog' (length=15)
# important
1 =>
array
'index' => string 'helloworld:Index' (length=16)
404 => string 'helloworld:Missingb' (length=19)
503 => string 'helloworld:Offline' (length=18)
'nojs' => string 'helloworld:Nojs' (length=15)
'blogb' => string 'helloworld:blog' (length=15)
# not that important
2 =>
array
'index' => string 'helloworld:Index' (length=16)
404 => string 'helloworld:Missingc' (length=19)
503 => string 'helloworld:Offline' (length=18)
'nojs' => string 'helloworld:Nojs' (length=15)
'more' => string 'helloworld:Nojs' (length=15)
# so on
将它们加入到一个数组中
array
'index' => string 'helloworld:Index' (length=16) # from 0 ( others same key )
404 => string 'helloworld:Missinga' (length=19) # from 0 ( others same key )
503 => string 'helloworld:Offline' (length=18) # from 0 ( others same key )
'nojs' => string 'helloworld:Nojs' (length=15) # from 0 ( others same key )
'blog' => string 'helloworld:blog' (length=15) # from 0 ( new )
'blogb' => string 'helloworld:blog' (length=15) # from 1 ( new )
'more' => string 'helloworld:Nojs' (length=15) # from 2 ( new )
- 当密钥不同时 = 追加
- 当密钥相同时 = 检查重要级别得到一个最高级别
问题我们可以将多个合并到数组中的最佳方法是什么?
感谢关注
亚当斋月
【问题讨论】: