_theme_table_cell

  1. drupal
    1. 4.7
    2. 5
    3. 6 theme.inc
    4. 7 theme.inc
Versions
4.7 _theme_table_cell($cell, $header = 0)
5 – 7 _theme_table_cell($cell, $header = FALSE)

Code

includes/theme.inc, line 1011

<?php
function _theme_table_cell($cell, $header = 0) {
  $attributes = '';

  if (is_array($cell)) {
    $data = $cell['data'];
    foreach ($cell as $key => $value) {
      if ($key != 'data') {
        $attributes .= " $key=\"$value\"";
      }
    }
  }
  else {
    $data = $cell;
  }

  if ($header) {
    $output = "<th$attributes>$data</th>";
  }
  else {
    $output = "<td$attributes>$data</td>";
  }

  return $output;
}
?>