複製程式碼 程式碼如下:
function array_remove_key($array, $keys)
{
$num = count($keys);
_ ;
$last_key = $keys[$num_last];
for ($i = 0; $i {
$this_key = $keys[$i];
$this_var_name = 'this_array_' . $i;
$next_var_name = 'this_array_' . ($i + 1);
if (!array_key_exists($this_key, $$this_var_name)) {
break;
}
$this_key];
}
unset(${$next_var_name}[$last_key]);
return $array;
}