i have some problem to understand array_multisort
See how it sorts when two values are the same:
$a1=array(\"Dog\",\"Dog\",\"Cat\");
$a2=array(\"P
If you look at the documentation and the first example, you'll notice that this is the expected behavior.
With two arguments, both arrays: the first array is sorted; the second array will have its corresponding values re-arranged and sorted if the corresponding values in first column tie. As for your example, think of it as you're doing a SQL ORDER BY Animal, Name: