Home >Backend Development >PHP Tutorial > 这样的数组怎么降序输出

这样的数组怎么降序输出

WBOY
WBOYOriginal
2016-06-13 13:29:491291browse

这样的数组如何降序输出?
$arr=array(array('132','20120524','23232.2','21.31'),array('126','20120524','-231232.2','13.321'),array('321','20120524','232.32','1.31')));

根据第3小组数据进行降序输出,请老师指教,谢谢!

------解决方案--------------------

PHP code
foreach($arr as $v) $t[]=$v[2];
array_multisort($t,SORT_DESC,$arr);
print_r($arr); <div class="clear">
                 
              
              
        
            </div>
Statement:
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