<?php $firstarray=array(14,30,20);$secondarray=array(4,2,3); array_multisort($firstarray, $secondarray); var_dump($firstarray, $secondarray);
Standard input is empty
array(3) { [0]=> int(14) [1]=> int(20) [2]=> int(30) } array(3) { [0]=> int(4) [1]=> int(3) [2]=> int(2) }
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!