function array_diff_key2 in Custom Page 6
Same name and namespace in other branches
- 7 custompage_ui/custompage_ui.module \array_diff_key2()
This gives support for PHP4 which does not have array_diff_key function.
1 call to array_diff_key2()
- custompage_ui_delete_form_submit in custompage_ui/
custompage_ui.module
File
- custompage_ui/
custompage_ui.module, line 226 - Custom Page Admin UI
Code
function array_diff_key2($arr1, $arr2) {
if (function_exists('array_diff_key')) {
return array_diff_key($arr1, $arr2);
}
else {
$arr3 = array();
if (!is_array($arr1) || !(sizeof($arr1) > 0)) {
return $arr3;
}
foreach ($arr1 as $key => $val) {
if (!array_key_exists($key, $arr2)) {
$arr3[$key] = $val;
}
}
return $arr3;
}
}