function webform_validation_unprefix_keys in Webform Validation 6
Same name and namespace in other branches
- 7 webform_validation.module \webform_validation_unprefix_keys()
Undo prefixing numeric array keys to avoid them being reindexed by module_invoke_all
1 call to webform_validation_unprefix_keys()
- webform_validation_validate in ./
webform_validation.module - Webform validation handler to validate against the given rules
File
- ./
webform_validation.module, line 240
Code
function webform_validation_unprefix_keys($arr) {
$ret = array();
foreach ($arr as $k => $v) {
$new_key = str_replace('item_', '', $k);
$ret[$new_key] = $v;
}
return $ret;
}