You are here

function _value_is_flip_array_2d in Value is 7

Helper to flip a 2D array.

1 call to _value_is_flip_array_2d()
_value_is_get_file in ./value_is.module
Helper to get a file from $_FILES.

File

./value_is.module, line 160
All the element validators for #element_validate.

Code

function _value_is_flip_array_2d($array) {
  $out = array();
  foreach ($array as $a => $children) {
    foreach ($children as $b => $value) {
      $out[$b][$a] = $value;
    }
  }
  return $out;
}