久久久久久久视色,久久电影免费精品,中文亚洲欧美乱码在线观看,在线免费播放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ù)組某個元素

      php如何去掉數(shù)組某個元素

      php如何去掉數(shù)組某個元素

      1、直接使用“unset()”函數(shù),將數(shù)組中某個元素傳入“unset()”;

      $arr = [   'username' => 'xiaoliang',   'email' => '123456@qq.com' ];  unset($arr['username']);

      2、使用“array_splice()”函數(shù)將數(shù)組中某個元素去除;

      if(($key = array_search('day',$arr))){     array_splice($arr, $key,1); }

      3、使用“foreach”循環(huán)到特定元素進行“unset()”即可。

      foreach($array as $k=>$v){   if($v == 'day'){     unset($array[$k]):   } }

      推薦教程:《PHP教程》

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