有没有办法选择ksort的排序


Is there a way to choose the sorting of ksort?

我有ksort()的用法,我需要选择排序顺序(ASC/DESC)。

有没有一种方法可以在没有array_multisort()的情况下做到这一点?

krsort()用于降序
升序的ksort()

此外:

krsort()函数,根据按降序对关联数组进行排序
&
ksort用于升序

arsort()函数,根据按升序对关联数组进行排序。