You are here

function matrix_array_reverse in Webform Matrix Component 7

This is simple function to convert array rows to cols.

1 call to matrix_array_reverse()
_webform_csv_data_matrix in components/matrix.inc
Implements _webform_csv_data_component().

File

components/matrix.inc, line 779
Webform module matrix component.

Code

function matrix_array_reverse($array) {
  $out = array();
  foreach ($array as $rowkey => $row) {
    foreach ($row as $colkey => $col) {
      $out[$colkey][$rowkey] = $col;
    }
  }
  return $out;
}