krsort()
for descending order
ksort()
for ascending order
Is there a way to choose the sorting of ksort?
Domanda
I have a use for ksort()
and I need to choose the sorting order(ASC/DESC).
Is there a way of doing it without array_multisort()
?
Soluzione
Altri suggerimenti
Also :
krsort()
function to sort an associative array in descending order, according to the key.
&
ksort
for ascending order
plus
arsort()
function to sort an associative array in ascending order, according to the value.
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow