看板 PHP 關於我們 聯絡資訊
假設現在有個陣列 Array ( [a] => 2 [c] => KK [b] => 3 [test] => 789 ) 我希望把key為test的順序放到最前面,使用print_r出來後會變成 Array ( [test] => 789 [a] => 2 [c] => KK [b] => 3 ) 請問有什麼函數能達到呢? -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 59.125.41.241
UniFish:查查sort系列的指令 04/12 20:35
imcar:http://codepad.org/AWZPz93h 04/13 00:20
andreli:這樣呢? http://codepad.org/zbChFBJg 04/13 17:50
imcar:http://codepad.org/YCpGRwA6 04/13 22:36