array_multisort

It sorts multiple or multi-dimensional arrays

Example

<?php
echo “<pre>”;
$array1 = array(2, 4,1, 3);
array_multisort($array1);
print_r($array1);
?>

Output

Array
(
[0] => 1
[1] => 2
[2] => 3
[3] => 4
)


Share