recherche

Maison  >  Questions et réponses  >  le corps du texte

PHP怎么删除数组元素?

就是把键和值都移除..

foreach($arr as $k => $v )
{    if($v>10)
        删除arr[$k]
}


巴扎黑巴扎黑3031 Il y a quelques jours830

répondre à tous(1)je répondrai

  • 面对疾风吧

    面对疾风吧2016-11-10 16:44:02

    $arr = [    'test' => 'test',    'test1' => 'test1'];unset($arr['test'])

    print_r($arr);#####输出[    'test1' => 'test1']

    répondre
    0
  • Annulerrépondre