📜  php 从数组中删除元素 - PHP 代码示例

📅  最后修改于: 2022-03-11 14:53:39.326000             🧑  作者: Mango

代码示例6
$arr = array('a' => 1, 'b' => 2, 'c' => 3);
unset($arr['b']);

// RESULT: array('a' => 1, 'c' => 3)

$arr = array(1, 2, 3);
array_splice($arr, 1, 1);

// RESULT: array(0 => 1, 1 => 3)