索引數組的數組,比方說,你有一個數組,看起來像這樣:PHP排序根據陣列
$myArray []= array('firstname' => 'John' , 'lastname'=> 'Johnson');
$myArray []= array('firstname' => 'Adam' , 'lastname'=> 'Tyson');
$myArray []= array('firstname' => 'Mike' , 'lastname'=> 'Robinson');
$myArray []= array('firstname' => 'David' , 'lastname'=> 'Jackson');
你怎麼能排序$ myarray的根據姓氏?
可能重複:http://stackoverflow.com/questions/1905617/how-do-i-sort-multidimension-array-in-php – 2011-09-15 04:22:40
和另一個重複:http://stackoverflow.com/questions/1795244/sorting-a-multidimensional-array-in-php/1795268#1795268 – 2011-09-15 04:23:08