You are here

function webform_validation_unprefix_keys in Webform Validation 7

Same name and namespace in other branches
  1. 6 webform_validation.module \webform_validation_unprefix_keys()

Undo prefixing numeric array keys.

Opposite of webform_validation_prefix_keys().

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 364

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;
}