常用函数的总结 --里面一定有你未见

1.usort()

  <?php
  function re($a,$b){
    return ($a>$b)?1:-1;
  }
    $x=array(1,3,2,5,9);
    usort($x, 're');
    print_r($x);
  ?>
  Array ( [0] => 1 [1] => 2 [2] => 3 [3] => 5 [4] => 9 )

猜你喜欢

转载自www.cnblogs.com/youjianjiangnan/p/9114830.html