1. "Dog", "b" => "Cat", "c" => "Horse");
  2. krsort($my_array);
  3. print_r($my_array);
  4. ?>
复制代码

输出:

  1. "Dog", "b" => "Cat", "c" => "Horse");

  2. asort($my_array);

  3. print_r($my_array);
  4. ?>

复制代码

输出:

Array( => Cat[a] => Dog[c] => Horse)

>>> 更多内容,请查看 php数组排序方法大全 <<<



09-04 21:11