php: alphabetically sort multi-dimensional array by it's key?

s3s

New Member
I need to sort some nested arrays alphabetically by their key...Is there a native PHP function to sort the following so the nested arrays were in order like[G] -> array... -> array...[P] -> array... -> array...[T] -> array...here is an example unsorted array:\[code\] => 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 ) ) => 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. ) )\[/code\]
 
Back
Top