多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
# arrlist\_multisort() ## arrlist\_multisort() ``` <pre class="calibre11">``` arrlist_multisort($arrlist, $col, $asc = TRUE) ``` ``` #### 【功能】 对二维的关联数组进行排序。 一般应用在对从数据库中取出来的二维数组进行排序。 #### 【参数】 ``` <pre class="calibre11">``` $arrlist:二维关联数组 $col:排序的列 $asc:是否为升序,TRUE:升序;FALSE:倒序 ``` ``` #### 【用例】 ``` <pre class="calibre11">``` <?php $conf = include './conf.php'; include './xiunophp/xiunophp.php'; $data = array(); $data[] = array('volume' => 67, 'edition' => 2); $data[] = array('volume' => 86, 'edition' => 1); $data[] = array('volume' => 85, 'edition' => 6); $data[] = array('volume' => 98, 'edition' => 2); $data[] = array('volume' => 86, 'edition' => 6); $data[] = array('volume' => 67, 'edition' => 7); $r = arrlist_multisort($data, 'edition', TRUE); print_r($r); /* 结果: Array ( [0] => Array ( [volume] => 86 [edition] => 1 ) [1] => Array ( [volume] => 67 [edition] => 2 ) [2] => Array ( [volume] => 98 [edition] => 2 ) [3] => Array ( [volume] => 85 [edition] => 6 ) [4] => Array ( [volume] => 86 [edition] => 6 ) [5] => Array ( [volume] => 67 [edition] => 7 ) ) */ ?> ?> ``` ```