You are here

function tablefield_tablefield_to_array in TableField 7.3

Translate tablefield to associative array.

Parameters

array $trat: The tablefield.

Return value

array The associative array.

1 call to tablefield_tablefield_to_array()
tablefield_value_array_get in ./tablefield.module
Get the value property in formatted array.

File

./tablefield.module, line 255
Provides a set of fields that can be used to store tabular data with a node.

Code

function tablefield_tablefield_to_array($trat) {
  $ttrans = array();
  $rowkey = 0;
  foreach ($trat as $rowix => $rowvals) {
    foreach ($rowvals as $ix => $val) {
      $ttrans[$rowkey][] = $val;
    }
    $rowkey++;
  }
  return $ttrans;
}