1
我需要一些嵌套数组按其键值按字母顺序排序...php:按键排列多维数组?
是否有一个本地的PHP函数来排序如下这样的嵌套数组是为了像
[G] - >阵.. 。
[I] - >阵列...
[P] - >阵列...
[S] - >阵列...
[T] - >阵列...
这里是一个例子排序的数组:
[S] => Array
(
[26] => Array
(
[name] => St Georges Hall
[tel] => sdfa
)
[27] => Array
(
[name] => St Werburghs Community Centre
[tel] => sadf
)
)
[G] => Array
(
[40] => Array
(
[name] => The Golden Guinea
[tel] =>
)
[41] => Array
(
[name] => The Golden Lion
[tel] => One of Bristol's key live music pubs
)
)
[I] => Array
(
[45] => Array
(
[name] => The Island
[tel] => asdfgf
)
)
[P] => Array
(
[50] => Array
(
[name] => The Prom
[tel] => Reliable gig venue and blues hotspot on Gloucester road
)
)
[T] => Array
(
[51] => Array
(
[name] => The Thunderbolt
[tel] => Small gig venue in Totterdown
)
[52] => Array
(
[name] => Tobacco Factory
[tel] => A modern cafe-bar with regular live music.
)
)