2), array("id"=>1), array("id"=>5), array("id"=>7), array("id"=>33),);如何找到"/> 2), array("id"=>1), array("id"=>5), array("id"=>7), array("id"=>33),);如何找到">

求数组中最小的id,该如何处理

WBOY
Release: 2016-06-13 10:11:32
Original
1053 people have browsed it

求数组中最小的id
$arr1=array(
array("id"=>2),
array("id"=>1),
array("id"=>5),
array("id"=>7),
array("id"=>33),
);

如何找到最小的id的值

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

PHP code
foreach($arr1 as $v){   $arr[]=$v['id'];}echo min($arr);<div class="clear">
                 
              
              
        
            </div>
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 Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template