문제

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()?

도움이 되었습니까?

해결책

krsort() for descending order
ksort() for ascending order

다른 팁

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top