<?php $names = array('a', 'c', 'd', 'b');$ages = array(1, 2, 3, 4); array_multisort($names, $ages); var_dump($names, $ages);
Standard input is empty
array(4) { [0]=> string(1) "a" [1]=> string(1) "b" [2]=> string(1) "c" [3]=> string(1) "d" } array(4) { [0]=> int(1) [1]=> int(4) [2]=> int(2) [3]=> int(3) }
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!