Example:
<?php $arr = Array (0=> array ("id" = "1208", "fromid" = "2", "froms" and "=" St Rategy "," name "=" "", "Sort" and "1", 1=> Array ("id" = "1209", "Fromi D "=" 3 "," Froms "and" strategy "," name "=" "," Sort "and" 7 ", 2=> Array ( "id" = "1210", "Fromid" and "271", "froms" and "tag", "Name" = "BC", "Sort" and "2" ), 3=> array ("id" = "1211", "fromid" = "263", "froms" = "tag", "Name" = > "777", "Sort" and "3", 4=> Array ("id" = "1212", "fromid" = "262", "Froms" = "tag", "Name" = "6666", "Sort" and "5", 5=> Array ("Choosecardty Peid "=" 1 "," Fromid "and" Froms "," Tagtype "," Sort "and" 4 "," Name "and" What are you going to do " ), 6=>Array ("Choosecardtypeid" and "1", "Fromid" and "Froms", "Tagtype", "sort" and "= 6", "Name" = "ha hehe"); function Multi_array_sort ($multi _array, $sort _key, $sort =sort_asc) {if (Is_array ($multi _array)) {foreach ($multi _ Array as $row _array) {if (Is_array ($row _array)) {$key _array[] = $row _array[$sort _key]; }else{return false; }}}else{return false; } array_multisort ($key _array, $sort, $multi _array); return $multi _array; } print_r (Multi_array_sort ($arr, ' sort '));
PHP Multidimensional (three) array specifying field ordering