Home > php教程 > php手册 > 用于二维数组排序

用于二维数组排序

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-06 19:31:35
Original
1048 people have browsed it

用于二维数组排序-PHP 无 源码与演示: 源码出处演示出处 function array_sort($arr, $field, $by = SORT_ASC){ foreach ($arr as $v) { $r[] = $v[$field]; } array_multisort($r, $by, $arr); return $arr;}

用于二维数组排序 - PHP

源码与演示:源码出处 演示出处

function array_sort($arr, $field, $by = SORT_ASC)
{
    foreach ($arr as $v) {
        $r[] = $v[$field];
    }
    array_multisort($r, $by, $arr);
    return $arr;
}
Copy after login
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template