我有这个 $countries 数组:
Array ( [0] => 2013 Germany [1] => country [2] => Berlin [3] => Beer)
Array ( [0] => 2012 Italy [1] => country [2] => Rome [3] => Wine )
Array ( [0] => 2013 Germany [1] => country [2] => Munich [3] => Beer )
Array ( [0] => 2013 Germany [1] => country [2] => Dusseldorf [3] => Beer )
Array ( [0] => 2013 Italy [1] => country [2] => Venice [3] => Wine )
Array ( [0] => 2013 Russia ....) etc
我想按年份的升序对其进行排序,所以我会有类似的东西
Array ( [0] => 2012 Italy [1] => country [2] => Rome [3] => Wine )
Array ( [0] => 2013 Germany [1] => country [2] => Berlin [3] => Beer)
Array ( [0] => 2013 Germany [1] => country [2] => Munich [3] => Beer )....
我已经尝试过sort、asort和natsort,但到目前为止它们似乎都不起作用。
有任何想法吗?