<?php $arr1 = array(1, 3, 2, 4); $arr2 = array("a", "b", "c", "d"); array_multisort($arr1, $arr2); print_r($arr1); print_r($arr2); ?>