久久久久久久视色,久久电影免费精品,中文亚洲欧美乱码在线观看,在线免费播放AV片

<center id="vfaef"><input id="vfaef"><table id="vfaef"></table></input></center>

    <p id="vfaef"><kbd id="vfaef"></kbd></p>

    
    
    <pre id="vfaef"><u id="vfaef"></u></pre>

      <thead id="vfaef"><input id="vfaef"></input></thead>

    1. 站長資訊網(wǎng)
      最全最豐富的資訊網(wǎng)站

      php怎么去除數(shù)組最大的值

      去除方法:1、使用sort()函數(shù)對數(shù)組進行升序排序,語法“sort($arr);”,升序排序后數(shù)組的最后一個元素就是最大值;2、使用array_pop()函數(shù)刪除數(shù)組的最后一個元素(最大值)即可,語法“array_pop($arr);”。

      php怎么去除數(shù)組最大的值

      本教程操作環(huán)境:windows7系統(tǒng)、PHP8.1版、DELL G3電腦

      php去除數(shù)組最大值的方法

      步驟1、使用sort()對數(shù)組進行升序排序

      <?php header('content-type:text/html;charset=utf-8');    $arr=array(1,45,9,52,0,-5,21,-1,40); var_dump($arr); sort($arr); var_dump($arr); ?>

      php怎么去除數(shù)組最大的值

      排序后該數(shù)組的最后一個元素就是最大值,刪除該元素即可。

      步驟2、使用array_pop()去除最大值

      array_pop():刪除數(shù)組中的最后一個元素。

      array_pop($arr);        //去掉最大值 var_dump($arr);

      php怎么去除數(shù)組最大的值

      推薦學(xué)習(xí):《PHP視頻教程》

      贊(0)
      分享到: 更多 (0)
      網(wǎng)站地圖   滬ICP備18035694號-2    滬公網(wǎng)安備31011702889846號