fork download
  1. <?php
  2.  
  3. $firstarray=array(14,30,20);
  4. $secondarray=array(4,2,3);
  5.  
  6. array_multisort($firstarray, $secondarray);
  7.  
  8. var_dump($firstarray, $secondarray);
Success #stdin #stdout 0.01s 20568KB
stdin
Standard input is empty
stdout
array(3) {
  [0]=>
  int(14)
  [1]=>
  int(20)
  [2]=>
  int(30)
}
array(3) {
  [0]=>
  int(4)
  [1]=>
  int(3)
  [2]=>
  int(2)
}