謝晒的PHP網頁設計
聯絡E-mail:
sean0704@gmail.com
站內搜尋
Friday, April 20, 2018
[好文][PHP] 多維陣列 如何用key來排序 (ksort a multidimensional array with two numeric keys)
ksort a multidimensional array with two numeric keys
說明:
krsort($f);
foreach ($f as &$v) {
krsort($v);
}
這裡使用 "&$" 代表使用"
參照
" 目的是讓 krsort($v); 執行後就直接改變$f
No comments:
Post a Comment
Newer Post
Older Post
Home
View mobile version
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment