[0] => Array (
[term] => punk
[term_html] => <a href=""> punk </a>
)
[1] => Array (
[term] => conflict
[term_html] => <a href=""> conflict </a>
)
[2] => Array (
[term] => Crass
[term_html] => <a href=""> Crass </a>
)
[3] => Array (
[term] => bct 2
[term_html] => <a href="">
)
我如何排序這個數組按字母順序基於內部數組的數組的「術語」?排序多維數組字母
我想這:
function sortByOrder($a, $b) {
return $search_terms_html[term];
}
uasort($search_terms_html, 'sortByOrder');
,但它不工作:(
[按字母順序排列多維數組](https://stackoverflow.com/questions/5526600/sort-multidimensional-array-alphabetically)可能的副本 –
uksort(); ....... –
剛測試過uksort()...相同的結果 – comdex