📜  删除数组元素 php 代码示例

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

代码示例6
//NO KEY supplied
$message array("a", "b", "c", "d");
$del_val = "b";
if (($key = array_search($del_val, $messages)) !== false) {
    unset($messages[$key]);
}