$array = array(5,4,6,8,5,3,4,6,1);
I want to sort $array as asort , but the problem is that asort is a function and its product cannot be stored in a variable.
How can I do something like this?
$array = array(5,4,6,8,5,3,4,6,1); $sorted_array = asort($array);
Edit: I also want $array keep its original order.
source share