I thought that the function array_multisort can sort multidimensional array, but this code does not work.
Code:
$values = array(0, 2, 1, array(0, 2, 1));
array_multisort($values, SORT_ASC);
var_dump($values);
Return:
array(4) [
   0 => 0
   1 => 1
   2 => 2
   3 => array(3) [
      0 => 0
      1 => 2 //should be 1
      2 => 1 //should be 2
   ]
]
Why the array in array is not sorted? Thanks
 
     
     
    